<< 29-09-2019 >>

00:00:01*junland quit (Quit: %ZNC Disconnected%)
00:01:46*junland joined #nim
00:06:13FromDiscord<exelotl> lol I'm so out of my depth here
00:07:13FromDiscord<exelotl> don't even know how to write a test for the desired codegen
00:08:01FromDiscord<exelotl> (for implementing the let produces C consts RFC)
00:13:41FromDiscord<exelotl> I think I got it, testament has a 'ccodecheck' key that uses the pegs module... just that I'm not used to writing these and I didn't realise it was inside a Nim string so backslashes require escaping
00:33:40*endragor joined #nim
00:38:27*endragor quit (Ping timeout: 265 seconds)
01:12:52*endragor joined #nim
01:17:07*endragor quit (Ping timeout: 245 seconds)
01:25:11shashlick@disruptek we shouldn't really need those calls since we aren't creating a gui
01:26:38shashlickActually that scintilla code needs to go into window.nim if possible
01:26:46shashlickSince it is GUI related
01:27:15shashlickCan comment out all scintilla code from sci
01:28:00*Hideki_ quit (Remote host closed the connection)
01:28:08shashlickIn fact I'll need to rename it to app.nim or something
01:29:53*LargeEpsilon joined #nim
01:34:12*LargeEpsilon quit (Ping timeout: 245 seconds)
01:40:11*owl_000 joined #nim
01:51:14*endragor joined #nim
01:56:16*endragor quit (Ping timeout: 265 seconds)
01:56:53FromGitter<nanjizal> Hi I am just reading Nim in action, I notice there is a webgl module but looks like it has not been worked on much recently, are there other webgl libraries webgl2 ones, is Nim used with js much?
01:58:56FromGitter<nanjizal> I guess I am wondering if there is any Nim libraries that target Shaders for Web and Cross platform.
02:53:15FromDiscord<treeform> nanjizal, I use nim in js mode a ton. I don't use it with webGL though 😦
02:53:47FromDiscord<treeform> nanjizal, for shaders see https://github.com/yglukhov/nimsl
02:54:07FromDiscord<treeform> yglukhov, compiles Nim to shader code in a macro.
02:59:29FromDiscord<Nanjizal> Not yet looked at Nim macros are they hard
02:59:58FromDiscord<Rika> no not really
03:01:00FromDiscord<exelotl> I couldn't really get into them until I worked through the examples in dom's book
03:01:21FromDiscord<exelotl> maybe there's better resources to learn them nowadays?
03:02:33FromDiscord<Nanjizal> I have only read chapter 1,2 and scanned 3, and some of 8
03:02:35FromDiscord<Rika> dunno, i used nim by example's macro as a base
03:03:00FromDiscord<Nanjizal> I think macros might be chapter9
03:03:25FromDiscord<exelotl> if you have the book then you're sorted ;)
03:06:15FromDiscord<exelotl> this page didn't exist back when I learned them https://nim-lang.github.io/Nim/tut3.html
03:06:19FromDiscord<exelotl> seems pretty solid
03:14:15FromDiscord<Nanjizal> My perspective is Haxe, but I have not really used thier macros they always seemed rather complex.
03:18:00FromDiscord<Nanjizal> thanks for the links.
03:22:58*Lunar joined #nim
03:23:16FromDiscord<Nanjizal> @treeform the js you code in Nim do you use Canvas much or is it more react type stuff
03:23:31LunarHey all! I'm entirely new to Nim, and I'd like to know how to convert a string to an int.
03:23:57LunarI tried to stream the string, then turn the stream into an int, but that didn't work
03:24:21LunarThis is just to make sure the user's input is numerical
03:25:53FromDiscord<treeform> @Nanjizal I do use canvas a ton
03:26:36FromDiscord<treeform> @Lunar, just `parseInt("123")`
03:26:54FromDiscord<Tsukiko(Lunar)> Seriously?
03:26:58FromDiscord<Tsukiko(Lunar)> It's that easy?
03:27:17*Lunar quit (Remote host closed the connection)
03:27:20FromDiscord<treeform> why would it not be? I think its a build-in because its so basic
03:27:34FromDiscord<treeform> there is also `parseFloat`
03:28:15FromDiscord<Lunar> Just a little frustrated. I've tried to do ``int("123")``, ``toInt("123")``, streaming the string
03:28:18FromDiscord<Lunar> Just a little shocked
03:28:19FromDiscord<Nanjizal> @treeform do you have any html canvas stuff on github
03:28:45FromDiscord<treeform> Hmm, not really all of it is in a private codebase for work.
03:29:32FromDiscord<treeform> I use this: https://github.com/define-private-public/HTML5-Canvas-Nim I think.
03:29:56FromDiscord<treeform> here are examples on how you work it: https://github.com/define-private-public/HTML5-Canvas-Nim/blob/master/test.nim#L23
03:30:29FromDiscord<treeform> Its very much like JS stuff I had before. I think it was straight line by line port.
03:32:03FromDiscord<Nanjizal> oh ok I normally use Haxe so I am kind of curious on the no OOP in Nim and what it looks like in a small project.
03:32:03FromDiscord<treeform> @Lunar https://nim-lang.org/docs/strutils.html#parseInt%2Cstring I think its in strutils module not a build-in
03:32:40FromDiscord<treeform> @Nanjizal I hate OOP I have used 0 OOP in the last 3 years or so.
03:33:40FromDiscord<Lunar> No, I've been using the parseutils module
03:33:46FromDiscord<Lunar> Just got it working too
03:33:47FromDiscord<Lunar> Ty
03:34:22FromDiscord<treeform> yeah parseutils has a more complex https://nim-lang.org/docs/parseutils.html#parseInt%2Cstring%2Cint%2Cint one
03:34:26FromDiscord<Lunar> ```nim
03:34:26FromDiscord<Lunar> import parseutils
03:34:26FromDiscord<Lunar> var number:int
03:34:26FromDiscord<Lunar> discard parseInt("123", number)
03:34:27FromDiscord<Lunar> echo number
03:34:27FromDiscord<Lunar> ```
03:34:27FromDiscord<treeform> I don't use it
03:34:33FromDiscord<Lunar> Discord has nim support
03:34:37FromDiscord<Lunar> 😱
03:35:26FromDiscord<treeform> why not `var number = parseInt("123")` ?
03:35:45FromDiscord<Lunar> because I'm exhausted and haven't gotten to that 😅
03:36:02FromDiscord<treeform> the other parse int lets you see if its a valid int
03:36:14FromDiscord<treeform> if you have some one typing non integers and you need to handle that
03:36:18FromDiscord<Lunar> and this:
03:36:22FromDiscord<Rika> what is the pure pragma supposed to do to enums
03:36:36FromDiscord<Lunar> ```l:\Desktop\App\Nim\Calc\main.nim(2, 26) Error: type mismatch: got <string>
03:36:36FromDiscord<Lunar> but expected one of:
03:36:36FromDiscord<Lunar> proc parseInt(s: string; number: var int; start = 0): int
03:36:37FromDiscord<Lunar> first type mismatch at position: 2
03:36:37FromDiscord<Lunar> missing parameter: number
03:36:37FromDiscord<Lunar>
03:36:37FromDiscord<Lunar> expression: parseInt("123")```
03:36:39FromDiscord<treeform> {.pure.} on enums is going a way
03:36:43FromDiscord<treeform> @Rika {.pure.} on enums is going a way
03:37:05FromDiscord<treeform> It switches their behavior a bit, to what it is now I think?
03:37:05FromDiscord<Lunar> and this:
03:37:05FromDiscord<Lunar> ```
03:37:05FromDiscord<Lunar> l:\Desktop\App\Nim\Calc\main.nim(2, 26) Error: type mismatch: got <string>
03:37:06FromDiscord<Lunar> but expected one of:
03:37:06FromDiscord<Lunar> proc parseInt(s: string; number: var int; start = 0): int
03:37:08FromDiscord<Lunar> first type mismatch at position: 2
03:37:08FromDiscord<Lunar> missing parameter: number
03:37:09FromDiscord<Lunar>
03:37:10FromDiscord<Lunar> expression: parseInt("123")
03:37:12FromDiscord<Lunar> ```
03:38:11FromDiscord<treeform> @Lunar https://play.nim-lang.org/#ix=1Xjo
03:38:53FromDiscord<Lunar> 🤔
03:39:04FromDiscord<Lunar> I have the *same* exact code
03:39:09disruptek{.pure.} just means that the enum must be used fully-qualified, with a prefix matching the type name. eg. MyEnumType.FirstEnumValue versus merely FirstEnumValue.
03:39:33disruptekuseful for exports.
03:39:33FromDiscord<treeform> disruptek is right I was wrong
03:40:05FromDiscord<Lunar> Also, parseInt is supposed to convert numbers only, correct?
03:40:33FromDiscord<treeform> @Lunar no you importer `parseutils` one not `strutils` one.
03:40:40FromDiscord<treeform> @Lunar no you imported `parseutils` one not `strutils` one.
03:41:01FromDiscord<Lunar> I had no clue that there was the same method in two different modules. My fault entirely
03:41:20FromDiscord<treeform> yeah I think the `parseutils` has a bad name
03:41:34FromDiscord<exelotl> @Tsukiko(Lunar) just to let you know, it's advisable not to use multiline messages here because this channel is bridged to IRC and Gitter. Your message won't show up properly for people who are using those
03:41:50FromDiscord<treeform> it should be `tryParseInt` or some thing
03:42:15FromDiscord<Lunar> Noted
03:42:53disruptek!eval import strutils; echo "42".parseInt
03:42:56NimBot42
03:42:58FromDiscord<exelotl> (but yeah it's awesome that nim syntax highlighting works on discord) ^^
03:43:16disruptek!eval import strutils; echo parseInt("42")
03:43:19NimBot42
03:43:27FromDiscord<Lunar> That's neat
03:43:27disruptek!eval import strutils; echo parseInt "42"
03:43:30NimBot42
03:43:39disruptek!eval import strutils; echo parseInt "not a number"
03:43:42NimBot/usercode/in.nim(1) in↵/nim/lib/pure/strutils.nim(1096) parseInt↵Error: unhandled exception: invalid integer: not a number [ValueError]
03:43:57disruptek!eval import strutils; echo parseInt("")
03:44:01NimBot/usercode/in.nim(1) in↵/nim/lib/pure/strutils.nim(1096) parseInt↵Error: unhandled exception: invalid integer: [ValueError]
03:44:29disruptekhave fun; the bot rarely gets exercise. 😁
03:45:03FromDiscord<Lunar> I should use it more then :P
03:45:25FromDiscord<Lunar> !eval echo "Test"
03:45:27NimBotTest
03:45:31FromDiscord<Lunar> Whoa.
03:45:49FromDiscord<Lunar> I didn't think it would work across chat clients
03:50:26FromDiscord<Lunar> How do I give a function an description? Like the one that pops up for ``echo``, ``parseInt``, ``import`` already?
03:50:44FromDiscord<Lunar> I tried to do ```"""This is a procedure description"""```, but that didn't work
03:50:58FromDiscord<Lunar> Definitely not like Python 😅
03:51:24disruptekuse ## this instead
03:51:45disruptekthen when you export the symbol, ## these contents will go in the docs.
03:52:21FromDiscord<Lunar> Thank you!
03:53:28disruptekalso note that if you don't export the symbol, it won't show up in the docs you generate with `nim doc somefile.nim`.
03:53:50FromDiscord<Lunar> Export the symbol...?
03:54:15disruptekby adding a * to the symbol name at definition, or with an `export` statement.
03:54:26FromDiscord<Lunar> I'll look into that later
03:54:33FromDiscord<Lunar> Thank you for letting me know about that though
03:55:13disruptekyeah, it confused me once.
03:55:16*chemist69 quit (Ping timeout: 264 seconds)
03:56:57*chemist69 joined #nim
04:05:49FromDiscord<Rika> disruptek, but when i put pure on an enum it still accepts a non-prefixed entry w/o the type name (within the file)
04:09:49*thomasross quit (Remote host closed the connection)
04:13:35disruptekyes, for convenience.
04:14:30FromDiscord<Rika> outside the file it has to be fully qualified?
04:15:10*endragor joined #nim
04:15:34FromGitter<zacharycarter> shashlick: with nimterop, it seems that header files with an extension of anything other than `.h` don't get picked up
04:15:36disruptekit's so you don't need to duplicate the type name in the enum name when exporting. eg. Http.Get, Http.Post, Http.Head, etc. versus having to define `type Http = enum HttpGet, HttpHead` and then having to use `HttpGet` in your file. this way, you can use `Get` as you implement use of the enum, but export it as Http.Get.
04:15:47FromGitter<zacharycarter> for instance `.h.in`
04:19:01disruptekand despite all that, you can be assured that `Get` is unlikely to clash with some other `Get` symbol.
04:36:01shashlickIn cImport?
04:37:16shashlickCan you share the output?
04:38:53FromGitter<nanjizal> Was trying to build nimx using nake any ideas I expect Apple have been messing with command tools again. ⏎ ⏎ Error: unhandled exception: Unable to read file: /Applications/Xcode.app/Contents/Developer/SDKs/MacOSX.sdk/SDKSettings.plist [IOError]
04:39:41*Hideki_ joined #nim
04:47:16shashlick@zacharycarter - I do exactly that here https://github.com/nimterop/nimterop/blob/master/tests/tpcre.nim
04:47:46*endragor quit (Remote host closed the connection)
04:47:53*endragor joined #nim
04:49:34FromGitter<zacharycarter> yeah but you use it with cimport
04:49:36FromGitter<zacharycarter> not cinclude
04:49:54FromGitter<zacharycarter> it doesn't matter anymore anyway :P I'm just going to link to the shared library
04:50:04FromGitter<zacharycarter> they were doing a bunch of cmake bullshit behind the scenes which I don't feel like replicating
04:50:52*nif quit (Quit: ...)
04:51:01*nif joined #nim
04:51:19*endragor quit (Read error: Connection reset by peer)
04:51:32*endragor joined #nim
05:03:04*Hideki_ quit (Remote host closed the connection)
05:19:51*thomasross joined #nim
05:20:52*theelous3 quit (Ping timeout: 245 seconds)
05:24:01*Trustable joined #nim
05:25:03*theelous3 joined #nim
05:40:16*endragor quit (Remote host closed the connection)
05:43:01*skoude joined #nim
06:01:42*skoude quit (Ping timeout: 245 seconds)
06:06:25*Romanson joined #nim
06:11:07*endragor joined #nim
06:15:09Zevvoi zacharycarter, how was umbra?
06:15:41*solitudesf joined #nim
06:15:52*endragor quit (Ping timeout: 245 seconds)
06:19:40FromGitter<zacharycarter> hey Zevv! it was just a phone call with their COO but it went well I think
06:19:43FromGitter<zacharycarter> in person next week
06:20:19Zevvsweet!
06:20:36ZevvIt's *so* hard to be without a job as an engineer these days :)
06:21:09FromGitter<zacharycarter> agreed
06:22:18*mibr joined #nim
06:24:01*narimiran joined #nim
06:36:13FromDiscord<Shield> what's the proper way to deal with `Connection was closed before full request has been made` error? the httpclient always fails on the first call after being idle for a bit
06:38:45*Hideki_ joined #nim
06:38:49*Hideki_ quit (Remote host closed the connection)
06:43:44*endragor joined #nim
06:48:15*Trustable quit (Remote host closed the connection)
06:48:41*endragor quit (Ping timeout: 265 seconds)
06:56:26Zevvhm maybe the remote closed the Keep-alive socket after some time, but Nim only notice when it starts sending on the socket a bit later?
06:56:48Zevvthat would be a bug on the nim side I guess
06:57:32*actuallybatman quit (Ping timeout: 245 seconds)
06:59:56*ng0 quit (Quit: Alexa, when is the end of world?)
07:00:00*gmpreussner quit (Quit: kthxbye)
07:00:29*ng0 joined #nim
07:05:04*gmpreussner joined #nim
07:07:51*Sailor2153 joined #nim
07:08:40*Sailor2153 quit (Client Quit)
07:08:48FromDiscord<Shield> it's a discord bot, AsyncWebSocket works fine, this only happens with AsyncHttpClient, i can't get the http status code because it throws an exception
07:10:13FromDiscord<Shield> the workaround i have so far is to wrap the calls in a try/except block then use a while loop, to make the call again, it works fine on the second call and further calls until you don't use it for few minutes
07:18:50*theelous3 quit (Ping timeout: 240 seconds)
07:24:28*Hideki_ joined #nim
07:30:02*Hideki_ quit (Remote host closed the connection)
07:34:59*LargeEpsilon joined #nim
07:44:25FromDiscord<arnetheduck> @awr1 we put `ptrops` in `stew` for now - https://github.com/status-im/nim-stew/blob/master/stew/ptrops.nim - we'll be trying them out there to see how they work in practise
07:46:27FromDiscord<Shield> Zevv may be into something, it fails at `parseResponse` in `httpclient.nim`, what i don't understand is, the calling function does call `newConnection`which closes the client if it's connected before making the request
07:47:30FromDiscord<Shield> i like how when i added 1 echo statement in that file the bug refused to show up so far
07:48:42FromDiscord<Shield> actually
07:51:38FromDiscord<Shield> https://github.com/nim-lang/Nim/blob/version-1-0/lib/pure/httpclient.nim#L783
07:52:15FromDiscord<Shield> this line might be the culprit, it ignores the whole `newConnection`
07:53:13FromDiscord<Shield> also on line 796 there's no need for `client.connected = false` since `client.close()` does that by default
07:53:37FromDiscord<Shield> i'm gonna make a new issue
08:02:25*dddddd quit (Remote host closed the connection)
08:14:01FromDiscord<Shield> issue link https://github.com/nim-lang/Nim/issues/12299
08:18:39*Vladar joined #nim
08:22:52*asymptotically joined #nim
08:33:54*nsf joined #nim
08:39:33*endragor joined #nim
08:49:38*endragor quit (Ping timeout: 240 seconds)
08:50:37*krux02 joined #nim
09:03:17*mibr_ joined #nim
09:03:50*mibr quit (Read error: Connection reset by peer)
09:08:25*mibr_ quit (Remote host closed the connection)
09:08:44*mibr_ joined #nim
09:20:52FromGitter<gogolxdong> Hi guys, here is a question, how to make threads and channels work on standalone OS?
09:27:07*Romanson quit (Quit: Connection closed for inactivity)
09:36:34*NimBot joined #nim
09:44:08*mibr_ quit (Remote host closed the connection)
09:53:57*Romanson joined #nim
09:59:12*narimiran quit (Ping timeout: 245 seconds)
10:10:03*solitudesf quit (Ping timeout: 240 seconds)
10:16:43*clyybber joined #nim
10:22:20FromGitter<gogolxdong> and how to trace a ptr type which is return from a ffi proc?
10:24:02Zevvwhat do you mean by "trace"?
10:25:10FromGitter<gogolxdong> cast it to ref
10:26:10Zevvyou can wrap it in a nim object
10:28:09FromGitter<gogolxdong> Is there any snippet?
10:28:38FromGitter<gogolxdong> Do you mean casting doesn't work by the way?
10:28:57FromDiscord<Shield> no you can't cast ptr to ref
10:29:32FromGitter<gogolxdong> event the syntax allows?
10:29:46ZevvNo, refs are more then a ptr, but wrapping into an object and using a finalizer should work
10:31:34ZevvI must admit I am still not sure how this fits in with the current language, though. Are finalizers related to destructors, and why are they not yet mentioned in the manual?
10:31:44FromDiscord<Shield> what do you mean by the syntax allows it?
10:32:00Zevvgogolxdong: http://ix.io/1Xkj
10:34:14FromDiscord<Shield> @Zevv I was about to ask exactly the same question
10:35:27FromGitter<gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d9088eebf625112c0ff74d3]
10:45:54clyybberZevv: Ideally finalizers should be the same as destructors in nim
10:47:09*endragor joined #nim
10:50:49*skoude joined #nim
10:52:23FromDiscord<Shield> so far it looks that =destroy only accepts objects, while finalizers accept refs
10:52:26ZevvThe information about this subjects is still fragmented I believe. Ideally, you'd want a finalizer to be able to do RAII for you, effectively cleaning up the moment something goes out of scop or loses its last reference, instead of when the GC feels like it
10:54:03FromDiscord<Shield> another note is that the finalizers are only called on GC_fullcollect()
10:54:57*skoude quit (Ping timeout: 240 seconds)
10:55:22FromDiscord<Shield> what i don't understand is why doesn't ref to Foo call the destructor of Foo
10:56:17*endragor quit (Ping timeout: 240 seconds)
11:00:50*Trustable joined #nim
11:08:38Araq`=destroy` sets the finalizer
11:10:19Zevvwhat is the relation with new(.., finalizer)?
11:12:52FromDiscord<Shield> Araq: can you explain in a clearer way?
11:18:46FromDiscord<Shield> so far it looks like `reset` is a good way to force a finalizer to execute, but it still doesn't call the destructor
11:19:40FromDiscord<Shield> according to Araq's comment in https://forum.nim-lang.org/t/4132#25775
11:19:40FromDiscord<Shield> the finalizer of ref T should call the destructor of T
11:19:47FromDiscord<Shield> i'm very confused
11:43:44FromDiscord<Rika> what's bitwise and in nim?
11:43:48FromDiscord<Rika> &?
11:49:38Zevv!eval 60 and 24
11:49:40NimBotCompile failed: /usercode/in.nim(1, 4) Error: expression '24' is of type 'int literal(24)' and has to be discarded
11:49:45Zevv!eval echo 60 and 24
11:49:48NimBot24
12:13:35Zevvhttp://zevv.nl/div/nim1.jpg http://zevv.nl/div/nim2.jpg
12:28:31*solitudesf joined #nim
12:32:21*adeohluwa joined #nim
12:36:11*Ven`` joined #nim
12:39:00clyybberZevv: Nice
12:41:56AraqZevv: is that real or a fake?
12:42:37Zevvreal
12:42:43Zevvdenmark
12:42:58Zevvawr mentioned that on #nim-offtopic
12:53:06shashlick@zacharycarter - that's why I've put together getHeader - check the v020 branch of nimterop
12:53:21FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/bM8Y/image.png)
12:53:27FromGitter<zacharycarter> Mr fix it has entered the scene
12:53:28shashlickAnd gcc itself won't pick up .in files
12:53:28*endragor joined #nim
12:54:41Zevvwhat's he doing, line dancing?
12:54:41FromGitter<zacharycarter> ah okay
12:54:51FromGitter<zacharycarter> could be
12:55:01FromGitter<zacharycarter> I just need to add animation uniforms
12:55:04FromGitter<zacharycarter> and I can get him moving
12:55:15Zevv:)
12:55:19FromGitter<zacharycarter> I'm not far off from being able to make a quake FPS with this thing
12:55:35FromGitter<zacharycarter> but I want to make the golf game I have in mind first
12:57:07*Romanson quit (Quit: Connection closed for inactivity)
12:57:24ZevvBFG: Big F***g Golf
12:57:34FromGitter<zacharycarter> I'm calling it FORE
12:57:55shashlick@zacharycarter - https://github.com/nimterop/nimterop/blob/v020/nimterop/build.nim#L695
12:58:35FromGitter<zacharycarter> shashlick: thanks! I don't think I'm going to use nimterop though for ODE - there's too much cmake crap going on behind the scenes to easily do it
12:58:48FromGitter<zacharycarter> like several calls to configure_file which are annoying to replicate
12:59:09shashlickSee the docs for getHeader
12:59:17shashlickYou don't need to replicate it anymore
12:59:49shashlickJust have cmake in your path that's all
13:00:09shashlickNimterop will build the lib and find the shared or static lib for you
13:00:32FromGitter<zacharycarter> ooo okay I'll try this out
13:00:40FromGitter<zacharycarter> thanks
13:01:17*endragor quit (Ping timeout: 276 seconds)
13:01:20shashlickSee the lzma or zlib tests
13:01:21shashlickAnd getHeader.nims
13:12:30*nsf quit (Quit: WeeChat 2.5)
13:15:29*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:16:15*Ven`` joined #nim
13:16:18*Ven`` quit (Client Quit)
13:17:58shashlick@treeform I'll bet you know this well - https://gankra.github.io/blah/text-hates-you/
13:19:33*theelous3 joined #nim
13:22:10*narimiran joined #nim
13:27:58owl_000treefrom, i asked a question in your typography.git
13:28:21*solitudesf quit (Remote host closed the connection)
13:29:55*solitudesf joined #nim
13:40:29FromDiscord<Shield> oh wow, Cairo bindings haven't been updated for a while now
13:45:43FromDiscord<Lunar> Does Nim have support for mobile?
13:46:20disruptekonly android, ios, or web. 😢
13:46:40FromDiscord<Lunar> So it does have support for Android and iOS
13:46:57disruptekactually, i think we have nightlys for raspberry pi now, too, right?
13:47:05disrupteknightlies, even.
13:47:14FromDiscord<Lunar> Interesting...
13:47:18shashlickYep
13:47:19FromDiscord<Lunar> Glad to know y'all do though!
13:47:28shashlickAndroid as well
13:47:32FromDiscord<Lunar> Nim is my new favorite language
13:47:55FromDiscord<Lunar> Now I just need to learn how to make a calculator in it 😅
13:47:57*whaletechno quit (Ping timeout: 240 seconds)
13:48:32FromDiscord<Corax> Sorry, I'm a complete newbie to nim :) I understand that nim compiles to intermediate C, so what does it mean for it to support a particular architecture? Does it mean the intermediate C is not platform agnostic?
13:49:05disruptekit means if you can target platform X using a C compiler, you can target platform X using nim.
13:49:16disruptekand ditto JavaScript.
13:49:23Zevvwell, up to a certain level
13:49:29disruptekand with the nlvm project, ditto LLVM IR.
13:49:39Zevvyou do need some of the host or platform support if you properly want to use the stdlib
13:49:57Zevvthe core language in theory runs "everywhere" with a moderately recent C compiler
13:50:02FromDiscord<Lunar> I do know that Nim supports most architectures, and all three main OS's.
13:50:06FromDiscord<Corax> Ok so it's mostly stdlib being tailored to the right syscalls and such?
13:50:34Zevvright. If your system is posix-y you you propbably have a nearly free lunch
13:50:48FromDiscord<Lunar> *Lucky*the
13:50:51FromDiscord<Lunar> *Lucky*
13:51:00Zevvbut more alien architectures are not too hard to add - for example nintendo switch was added some time ago without too much hassle
13:51:04FromDiscord<Corax> I work in embedded mostly, so I'm curious good much work is it too get nim running in a stm32 :) gotta do some reading
13:51:09FromDiscord<Lunar> Oh???
13:51:15FromDiscord<Corax> I work in embedded mostly, so I'm curious how much work is it too get nim running in a stm32 :) gotta do some reading
13:51:23FromDiscord<Lunar> I can develop for the Switch now... Sounds fun
13:51:41ZevvCorax: I got basic Nim running inside the linux kernel some time ago, which was also not too hard
13:51:56ZevvLunar: not sure what the state of this port is though, it feels a bit unloved
13:52:05FromDiscord<Lunar> That's fair
13:52:33ZevvSome people are currently putting a bit more effort into getting a smooth android experience, which would be cool
13:53:03owl_000that will be cool, i always wanted to write app for android.
13:53:22FromDiscord<Lunar> Writing an app for Android isn't that hard in Java
13:53:30FromDiscord<Lunar> I haven't got a clue for Nim though
13:53:36federico3Corax: I have Nim running even on attiny 85
13:53:37Zevvreal "apps" still always need an outer shell of java, but if you target games you should be ok dropping right into nim after initialisation
13:54:09Zevvfederico3: how did you override nims default aggressive heap allocation behaviour? Or do you do stack-only for now?
13:54:16FromDiscord<Corax> federico3: nice!
13:54:32dom96narimiran: Araq: is there a reason there is a `verison-1-0` branch?
13:54:39narimiranyes
13:54:40narimiran:)
13:54:54disruptekit's a typo.
13:54:59disrupteksupposed to be venison.
13:55:11dom96narimiran: what's the reason?
13:55:14FromDiscord<treeform> @Tsukiko(Lunar) https://forum.nim-lang.org/t/5197
13:55:16FromDiscord<Lunar> Dom: I'm assuming it's there so you can downgrade because of a bug or something
13:55:21narimirandom96: backports for 1.0.2
13:55:23federico3Zevv: nogc so far, but the ownedref experment looks promising
13:55:40narimiranjust like there are v-0-20 and v-0-19 branches
13:55:48Zevvfederico3: yes, but heap allocations in general, if you `new()` something?
13:56:13federico3so far I used the default
13:56:46dom96narimiran: I see. Might be a good idea to document this with a consistent format that we intend to use for these branches, this is already inconsistent with the v-0-20 branch :P
13:56:48federico3(and yes, it could be tuned, but to get there we need a community around SoC/embedded/micros)
13:56:58Zevvhmm ok. I put some stuff in a linux kernel module some time ago, but then I ran into the issue that Nim by default allocs in chunks of 500Mb or so to avoid malloc()/free() overhead
13:56:59dom96Lunar: that's what the git tags are for
13:57:04narimiranhow is it inconsistent?
13:57:14dom96narimiran: version vs. v
13:57:17Zevvwhat did work ok for me though was the basic newruntime stuff
13:57:22narimiranv0.20 -> branch version-0-20 branch
13:57:22dom96also, I'd say you should include `backports` in the name
13:57:27narimiranv1.0 -> branch version-1-0 branch
13:57:30ZevvI'll blow some dust of this repo to see if I can get things a bit more smooth
13:57:44federico3Zevv: did you say 500MB?
13:57:51FromDiscord<Lunar> Treeform: So I still need an Apple device to develop for Apple?
13:58:06dom96narimiran: ahh, you shortened it in your message
13:58:07FromDiscord<Lunar> Or specifically iOS
13:58:09narimiranyep
13:58:15FromDiscord<Lunar> Shame
13:58:19dom96narimiran: still, `backports` in the name would be nice :)
13:58:21Zevvfederico3: or 50 or so, let me check
13:58:37shashlickWhy
13:58:38narimirandom96: don't nitpick, it is ok (and consistent with the current branches :P)
13:58:47FromDiscord<Shield> @treeform i think you should add your cairo bindings to nimble.packages, finding it made me smile
13:59:00Zevvoh 500Kb it was ;)
13:59:02dom96narimiran: it's not a nitpick. I've seen someone link to this branch, probably assuming that it refers to v1.0 as was released
13:59:06Zevvwell, just a few zeroes
13:59:16shashlickGoing forward you want to branch out early and stabilize on the branch
13:59:19Zevvfederico3: but still, on a tiny85 I suspect the effect would be the same
13:59:29shashlickNot just backport
13:59:34dom96narimiran: and since I had to ask what it's about, it seems clear that most won't be able to deduce that it's for backports
13:59:41narimiranone can misuse or misunderstand things no matter how they are called
13:59:45federico3Zevv: not only that, most micros have < 500KB
14:00:00narimirandom96: that's because you haven't payed the attention for the last year or so ;)
14:00:07shashlickTags are for specific versions
14:00:08Zevvfederico3: that's what I mean yes. The effect is the same if it tries to alloc 500K or 500M :)
14:00:16shashlickBranches don't stay still
14:00:30dom96narimiran: I already pay for more attention than most
14:00:41narimiranshashlick: agreed with all you just said
14:00:42Zevvfederico3: so I ended up making a specific os target in the compiler, but I feel it should be easier
14:01:59shashlick@dom96 - https://github.com/dom96/choosenim/pull/135
14:02:04federico3Zevv: clearly the allocation behavior is different when nogc and --os:none
14:02:10shashlickI'll fix the nimble ci next week
14:02:18Zevvfederico3: used newruntime
14:02:24federico3ah
14:03:06federico3I meant --os:standalone
14:03:36Zevvah right
14:05:14Zevvhm stuff doesn't work anymore anyway, raiseExceptionEx errors and the like
14:09:12*adeohluwa quit (Ping timeout: 245 seconds)
14:10:15ZevvAnyone know what "Error: system module needs: raiseExceptionEx
14:10:18Zevvmight indicate?
14:10:26Zevvthat's on os-standalone
14:11:04disrupteksome kinda os-specific unwind lib?
14:12:07disruptekno os means exceptions don't occur. i think i found my new compilation target.
14:12:19ZevvI use quirky's here anyway
14:12:40Zevvbut still, this used to work but broke somewhere over the last half year
14:15:08federico3Zevv: one sec
14:19:00federico3Zevv: http://paste.debian.net/1103263/
14:20:01Zevvyeah I have those, but is there a relation with raiseExceptionEx() then?
14:20:56*daddoo joined #nim
14:28:38*dddddd joined #nim
14:28:46FromDiscord<Lunar> Can Nim render HTML
14:29:06ZevvLunar: https://nim-lang.github.io/Nim/htmlgen.html
14:31:55disrupteksee also the karax package.
14:33:26Zevvyeah, use that indeed
14:34:42*salewski joined #nim
14:35:33salewskihttps://irclogs.nim-lang.org/29-09-2019.html#13:40:29
14:35:38salewski<Shield> oh wow, Cairo bindings haven't been updated for a while now
14:36:38salewskiShield, they are also in oldgtk and gintro -- and the treeforms seems to be based on my ones too.
14:36:41*salewski quit (Client Quit)
14:45:35disrupteklurker driveby
14:46:00FromDiscord<Lunar> Zevv: I'm assuming this can be used with a GUI application to make a "electron" sort of feel?
14:49:40disruptekno, because it's not a browser. you use it in your browser, via a js target. or on a server, to render for a client, etc.
14:54:06FromDiscord<Lunar> So then, Nim does not have an HTML renderer
14:56:18Zevvaah render the other way around. I guess your question had a certain level of abiguity
14:57:29FromDiscord<Lunar> My bad, should've clarified more
14:57:31ZevvCan you name some renderers from other languagqes?
14:57:38*nsf joined #nim
14:57:43FromDiscord<Lunar> Well, there's Electron
14:57:52*endragor joined #nim
14:57:55ZevvBecause these days if you want that, you end up with webkit or electron
14:58:09FromDiscord<Lunar> Then in Python, there's ``tkhtml``
14:58:34Zevvthats kind of crappy, actually
14:58:38Zevvand not python
14:58:44Zevvit has a binding, yes, but thats about it
14:59:04FromDiscord<Lunar> and in Java there's ``Htmlunit`` and ``HTML Cleaner``
14:59:17Zevvyes, but that does not *render*, does it?
14:59:17FromDiscord<Lunar> I'm well aware Tkhtml's use
14:59:24Zevvit just parses
14:59:24FromDiscord<Lunar> I suppose not
14:59:29Zevvwe have that
14:59:49FromDiscord<Lunar> Interesting
14:59:55Zevvhtmlparser and xmlparse, if I remember correctly
15:00:15FromDiscord<Lunar> So in order to make an HTML GUI application, I have to make a library to do so
15:00:21FromDiscord<Lunar> Just like how electron has
15:00:23FromDiscord<Lunar> and webkit
15:01:09FromDiscord<Lunar> Well, that's fine
15:01:20FromDiscord<Lunar> I didn't come to learn Nim because of it's HTML capabilities
15:01:25Zevv:)
15:01:40FromDiscord<Lunar> Thanks for your help Zevv
15:01:52FromDiscord<Lunar> Any other GUI libs you recommend?
15:04:28FromDiscord<Lunar> Found this website: <https://matthiashager.com/gui-options-for-nim>. Looks promising
15:04:31ZevvNot that I have experience with, I'm not a gui kind of guy
15:04:54Zevvi do know that the-one-gui-to-rule-them-all is still not here
15:05:26Zevvafaik there is no viable and mature cross-platform option for nim yet
15:05:39Zevvbut that is the right page to start from I guess
15:07:15*endragor quit (Ping timeout: 240 seconds)
15:08:10FromDiscord<Lunar> <https://github.com/zacharycarter/nuklear-nim> Seems to be the one-gui-rules-them-all
15:08:18FromDiscord<Lunar> It's on all supported platforms
15:08:23FromDiscord<Lunar> My only problemis
15:08:25FromDiscord<Lunar> My only problem is
15:08:29FromDiscord<Lunar> What can it do?
15:09:01Zevvits a binding for https://github.com/vurtun/nuklear
15:09:25Zevvwhich is portable, true, but it is not a native gui, which is kind of what i ment
15:10:42FromDiscord<Lunar> Same here tbh. But hey, it works
15:14:34Zevvso, what are you looking for in Nim then?
15:15:47FromDiscord<Lunar> AS of right now, I'm using Nim for cross platform support
15:15:57FromDiscord<Lunar> and CPU support
15:16:02Zevvwell, there it shines indeed
15:16:05FromDiscord<Lunar> Indeed
15:16:26FromDiscord<Lunar> Since I don't have an Apple device, Nim is really the only way to develop for my friends Mac
15:16:39FromDiscord<Lunar> and of course, other poor Apple users
15:16:40FromDiscord<Lunar> 😂
15:17:11Zevvhmm I guess you could as well do c++ or go or rust then?
15:17:18FromDiscord<Lunar> Yes, I could
15:17:18FromDiscord<Lunar> but
15:17:21Zevvbut
15:17:30owl_000they are hard
15:17:34Zevvhaha. Well
15:17:37owl_000bloated
15:18:00FromDiscord<Lunar> I tried C+, but couldn't tell the difference between the C code and the C++ code
15:18:03Zevvgo is not hard, nor is it bloated. But Go is just a bit *too* basic for some
15:18:42FromDiscord<Lunar> I haven't actually tried Rust yet
15:18:50Zevvmodern c++ is nowhere near c. I loathed c++ for years, but with the very latest standards I find it almost bearable
15:19:05ZevvI trued rust, and I plan to do this years advend of code in Rust
15:19:14FromDiscord<Lunar> Also I couldn't find a C++ compiler with the latest standards
15:19:16Zevvbut I'm not sure if I will really *like* it
15:19:35ZevvPersonally what I find in Nim is simply joy in coding
15:19:50FromDiscord<Lunar> Other than VS, but I don't want to install 20GB just to try to write in a language I don't understand
15:20:01FromDiscord<Lunar> Nim does look *very* promising in the future
15:20:09FromDiscord<Lunar> Which is one reason why I'm learning it
15:20:18Zevvtrue, it is very light on the dependencies
15:20:32FromDiscord<Lunar> Indeed
15:20:47owl_000zevv, do you think rust has dependency problem? one cargo dopends on lot of cargo
15:20:57ZevvWell, I am in no position to do so, but still I welcome you to the Nim community!
15:21:25Zevvowl_000: I know nearly *nothing* about Rust, so I try not to have too many opinion yet
15:21:29Calinoufinding compilers that support C++17 today isn't particularly difficult, just saying :P
15:22:03ZevvI understand the problems they are trying to support, but for some reason my first encounters with Rust were harder for me then my first encounters with Haskell
15:22:14owl_000and learning material which focuses on c++17 is rare
15:23:03Zevvowl_000: basic templates and smart pointers are nice, but I still loathe the obligatory OO-verywhere paradigm
15:23:05FromDiscord<Lunar> I don't believe MinGW supports the latest standards
15:23:24FromDiscord<Lunar> I know Clang does, but it's hard finding a linter/compiler for it
15:23:28ZevvAnd maybe, just maybe, when coroutines take off in c++20, I will give it another chance
15:23:29FromDiscord<Lunar> VSC didn't quite cut it
15:23:39FromDiscord<Lunar> Same here
15:24:48ZevvI need to do c++ for work, and I am really amazed my the dire state of some parts of the ecosystem. Pages and pages of error messages from the compiler when I make some trivia mistake which happens to confuse the STL
15:24:58owl_000in term of documentation, undeniably rust sets a role model
15:25:18federico3how so?
15:25:36ZevvNim made good progress here, but lots to do yet I guess.
15:26:35Zevvluckily we have narimiran :)
15:26:57owl_000yes, thanks to him
15:27:07narimiranone narimiran vs all rust employees working on their docs ;)
15:27:49FromDiscord<Lunar> If you want a role model for documentation, take a look at PHP
15:28:24Zevvand there is one of the main things that brought me to Nim instead of all other options: no corporate involvement.
15:28:39CalinouMinGW definitely supports C++17 if you pick it from the right source (i.e. MSYS2, not the age-old mingw32)
15:28:57CalinouClang also has official Windows binaries available
15:29:29CalinouZevv: well, Status.im does sponsor Nim development
15:30:05FromDiscord<Lunar> > No corporate development
15:30:06FromDiscord<Lunar> Wdym by that?
15:30:31FromDiscord<Lunar> Do you mean that Microsoft doesn't make it or something?
15:30:33ZevvI recently witnessed this really nice failure of communication between core nim developers and status. Nimpeople were working on features that statuspeople didnt really care about, and nimpeople didnt know that. So you can say all you want, status does not in anyway seem to dictate where nim is going
15:31:08Zevvlunar: I mean there are no commercial parties involved in nim, financially nor politically
15:31:38owl_000moving python to nim was easier than other option. i picked nim
15:31:51owl_000as it is the most productive.
15:31:52ZevvNim kind of goes where Araq, our benevolent dicatator, wants it to go.
15:31:58*nif quit (Quit: ...)
15:32:08Zevvowl_000: right. productivity and low friction
15:32:08*nif joined #nim
15:32:29Zevvwhich for me end up in "joy"
15:32:56owl_000how nim combined efficiency productivity and performance at the same time. baffled me
15:33:35owl_000as fast as c and as productive as python!!!
15:33:48federico3owl_000: it's the whole point of the language :)
15:34:41disruptekthe aesthetic is probably most important to me, because we spend more time reading code than writing it. i struggle enough reading someone else's code; i don't want to also have to wade through noise.
15:34:53FromDiscord<exelotl> is there a nim equivalent of https://svelte.dev/ ?
15:35:25federico3karax
15:35:26disruptekkarax is closest.
15:35:38FromDiscord<exelotl> yeah, but karax uses a virtual dom right?
15:35:51disruptekyes, but you can pretend it doesn't.
15:36:44disrupteki guess what i'm trying to say is that this technical detail is not going to be as important as just about everything else.
15:37:21FromDiscord<exelotl> yeah I guess, when it comes to Getting Stuff Done it doesn't really matter
15:38:08FromDiscord<exelotl> but my understanding is that svelte is faster than everything else out there (besides writing pure JS)
15:38:53disrupteki should really write the history of my startup, i feel like it would be worth reading for some.
15:39:25Zevvoh please do
15:39:41disruptekspeed is great, it's like having a knob you can twiddle instead of having to do work.
15:39:59*actuallybatman joined #nim
15:39:59FromDiscord<exelotl> hahaha
15:40:00disruptekit's a strength of nim. i understand where you're coming from with the speed focus.
15:40:35disruptekbut, at the end of the day, you have to balance against development effort. if you build something fast that you cannot change, when it's slow, you're screwed.
15:41:04ZevvI made a 500 line poc project in my company in nim
15:41:12disruptekwith nim, i get something that is naturally fast. fast enough that i don't have to worry about speed unless i'm running into situations where i _should_ be worrying about speed.
15:41:24disruptekbut the real speed boost is in productivity.
15:41:29Zevvit was reimplemented in c++ and java. it is now 15k lines and there i a performance issue
15:41:43Zevvi do not know how they managed to do that
15:42:01disruptekand that's where you get your speed wins, anyway -- in redesign, rearchitecture, understanding the problem better, building a prototype, building 10 prototypes, changing your algorithm, inventing a new algorithm, etc.
15:42:12owl_000i tried rust before learning nim. rust has lot restriction and there is no difference whether you are writing hello world or business grade soft. which is problematic for every day task. simple learning took almost 2gb of hardisk space.
15:42:29FromDiscord<exelotl> Zevv that's tragic lol
15:43:04owl_000trying examples was pain too.
15:43:48owl_000if you want to do some research or trying out it is not easier.
15:44:26disrupteki think that's a pretty accurate criticism of rust, owl_000.
15:44:33owl_000but nim doesn't have this problem.
15:45:43Zevvso that leaves go
15:45:45Zevvgo is great
15:45:53disruptekgo is pretty good, yes.
15:46:03ZevvI have no technical critiques on Go I think.
15:46:38disruptekdoesn't have the portability, the backend agnosticism, the ffi is a little weaker, it's pretty opinionated, no generics.
15:46:51disruptektbh i haven't written any in years.
15:47:07owl_000another thing is go binary is huge
15:47:41disruptektakes me less than 10s to build a new nim compiler. takes the same machine 24m to install rust.
15:48:37FromDiscord<exelotl> writing bindings in Go was really scary to me, especially for structs, it's just like "define these fields and pray that the C compiler agrees with you on how they should be laid out in memory"
15:48:43disruptekgo is probably the right language for my use-case, but i just think it's too walled-garden for my tastes. nim feels like it has legs. like it could be around awhile.
15:48:47*ng0 quit (Remote host closed the connection)
15:49:18owl_000what is the advantage of go over nim?
15:49:34owl_000lots of library maybe
15:49:35federico3what? go is pretty rudimentary
15:49:44disruptekyeah, the ffi is fine if you have high-quality stuff to bind to, eg. it's your own code or it's pretty fresh.
15:49:50*ng0 joined #nim
15:50:07FromGitter<awr1> go is a response to C++
15:50:35disrupteki'd say the go advantage is in concurrency. just a much better story there.
15:50:42FromGitter<awr1> it's C but with type inferrence, modules, and channels
15:50:49FromGitter<awr1> and defer.
15:50:53disruptekopinionated and well-reasoned, internally consistent.
15:51:05FromGitter<awr1> and multiple return, but that's basically tuples.
15:51:11FromGitter<awr1> i can't think of anything else
15:51:28federico3awr1: no, it was designed to replace Python
15:51:47disruptekyeah, it's a c-like python conceptually.
15:51:55federico3and for a very specific use case
15:51:56disruptekthe audience...
15:52:02disruptekgoogle engineers.
15:52:09federico3no, google interns
15:52:13disrupteklol
15:52:36disrupteknew google engineers. 😛
15:52:45FromGitter<awr1> is it? i always heard it was grown out of pike's hatred of C++
15:53:00FromGitter<awr1> of course i don't think it picked up many C++ users
15:53:08disruptekdid you ever try pike, btw? pretty cool language back in the day.
15:53:25disrupteki looked it up recently. hard to believe it's still around.
15:53:43FromGitter<awr1> i heard about it, but i was reffering to rob pike
15:53:53disruptekyes.
15:54:03owl_000rust will replace c++, go can't
15:54:11FromGitter<awr1> oh no i agree
15:54:20FromGitter<awr1> go picked up more ruby people than it did C++
15:54:41disruptekhmm, replacing c++ is quite a tall order. c++ isn't standing still.
15:54:58FromGitter<awr1> pike (the language) had conceptually the right idea by being "hey, static types aren't *all* bad"
15:55:59disruptekat the time, the idea of an interpreted c that was as comfortable as pike was a novelty.
15:57:08owl_000have you heard about zig lang, the authors plan is to replace C
15:57:34FromGitter<awr1> https://github.com/golang/go/issues/32437
15:57:40FromGitter<awr1> it's funny to me how contraversial this was
15:58:14FromDiscord<exelotl> I found a bug at work the other day because someone had done something like `sendEvent("useShield:"+ProgressManager.getLevelIndex)`
15:58:21FromDiscord<exelotl> and javascript, in all its wisdom, decided to convert the whole 'getLevelIndex' function to a string and join them together
15:58:46FromDiscord<exelotl> gotta love dynamic typing lol
16:00:31disruptekjs has some good parts that have changed my code, but honestly, the ecosystem is such a dumpster fire that i cannot look past it.
16:02:52*uu91 quit (Remote host closed the connection)
16:07:58*Ven`` joined #nim
16:09:55disruptekthis go thread is interesting. deanveloper hits the nail on the head, imo.
16:11:03owl_000@treeform, how to get seq from typography, i want to add text support in https://github.com/sk-Prime/nimDraw
16:20:06Zevvaw now I'm too late. I wanted to throw in vlang, while we were at it
16:21:07owl_000vlang is vice lang
16:24:13*def- quit (Quit: -)
16:28:01*rmrf joined #nim
16:28:21*rmrf quit (Remote host closed the connection)
16:28:22*solitudesf- joined #nim
16:30:37FromGitter<Varriount> Isn't vlang the one that has a lot of promised features, that aren't implemented yet?
16:31:06*solitudesf quit (Ping timeout: 265 seconds)
16:32:29FromGitter<Varriount> Zevv ^
16:32:41*solitudesf- quit (Client Quit)
16:32:48shashlick@varriount yep
16:33:02*solitudesf joined #nim
16:33:42shashlickI used Go after a long time in python
16:33:52shashlickIt was too restrictive
16:34:01shashlickFrustrating
16:34:15shashlickThen I find Nim and loved the freedom and the performance
16:35:22shashlickOf course I routinely run into the boundaries with Nim as well, though I think that's just a maturity thing for Nim
16:36:25*LargeEpsilon quit (Ping timeout: 265 seconds)
16:38:44disruptekyep, i think most of the really exciting nim stuff is waiting to be written.
16:40:30shashlick@disruptek did you try to build feud yesterday on Linux?
16:40:41shashlickWhat's your time zone by the way
16:41:03disruptekedt at the moment, but i live on the road.
16:41:11disrupteki did try it but scintilla killed me.
16:43:25shashlickI messaged about that last night
16:44:06disruptekahh, i see.
16:44:15disruptekokay, i will try hacking it out.
16:44:32*Traviss__ quit (Quit: Leaving)
16:44:32*traviss quit (Quit: Leaving)
16:44:34shashlickhttps://irclogs.nim-lang.org/29-09-2019.html#01:25:11
16:44:53shashlickRemote is also not compiling due to some link error
16:45:11shashlickReally just need the config plugin and perhaps something else
16:46:13shashlickBut I suspect it might still not be enough since there's calls to eMsg everywhere
16:46:24shashlickAnd that's from window
16:46:32disrupteki need to tell it where glib is apparently. the include.
16:46:42shashlickWill be back home today and will try both tests
16:47:00shashlickWell I welcome you to post it to Linux :)
16:47:04shashlickPort
16:47:11disruptekyeah, i'll see how far i get.
16:47:20shashlickThere's a lot of windows specific code in window
16:47:29shashlickFor keyboard and mouse stuff
16:47:32shashlickEvent loop etc
16:47:40disruptekyuk.
16:47:57shashlickI was hoping for a toolkit that did it cross platform
16:48:03shashlickBut there's nothing I could find
16:48:11*traviss joined #nim
16:48:14FromDiscord<Kiloneie> let data = readline(stdin)
16:48:14FromDiscord<Kiloneie> What is the correct name for stdin ? enumerator or keyword ?
16:48:18*Traviss__ joined #nim
16:48:42*Traviss__ quit (Client Quit)
16:48:58owl_000that is a good question
16:49:09shashlickWhat gui toolkit can do keyboard, hotkeys etc
16:49:19shashlickAnd host scintilla
16:49:55disruptekstdin is just a value.
16:51:55owl_000echo type(stdin) => File
16:52:33disruptekuse `typeof` in preference to `type`.
16:52:52*Trustable quit (Remote host closed the connection)
16:52:58owl_000i always forget it. :(
16:53:07FromDiscord<Kiloneie> hmm okay
16:54:39shashlickAny imgui experts here
16:55:06disruptekzacharycarter is your man.
16:58:22*owl_000 quit (Ping timeout: 245 seconds)
16:58:24disrupteknow i just need to fix feud linking.
17:02:29FromDiscord<Kiloneie> Have you guys played with VS Code's terminal font size ?
17:02:55FromDiscord<Kiloneie> What font family do you use ? The default one won't go past 28 pixels for me.
17:03:26FromGitter<awr1> @disruptek yeah i agree
17:03:40FromGitter<awr1> their response is the most rational
17:04:22*endragor joined #nim
17:05:03FromGitter<awr1> i just get the feeling that most of the Go people are in this state of being afraid that they will move past some notion of purity and their language will turn into java
17:05:27disrupteknot a fan of reactionary design.
17:05:39disruptekbetter to have a good idea of where you want to go than to merely flee where you've been.
17:06:08FromGitter<awr1> i suppose its ironic since i also happen to be okay with `result` and `return` in nim but w/e
17:06:17FromGitter<awr1> but yeah that's why i've never really cared for Go
17:06:24FromGitter<awr1> it seems like a kneejerk reaction
17:07:30disruptekoh, i think it's not a bad language. i just don't think "because it's too similar to java" is the best argument. i think deanveloper is appropriately discussing the actual flaw as opposed to merely contrasting to java exceptions.
17:08:25FromGitter<awr1> i feel like the kneejerk-ness is kinda intrinsic to go. generics were bad in C++, ergo, no generics
17:08:28disruptekmy problem with go is that i just think it's going to be limited in scope by design, and i hate feeling like my limitations are due to language as opposed to my own personal deficiencies.
17:09:58disrupteki mean, people have written some big apps, but they require pretty verbose codebases that run into real limits of that which makes go suitable for everyone else. (afaict)
17:10:27*endragor quit (Ping timeout: 245 seconds)
17:14:16FromDiscord<Lunar> I believe I found a bug
17:14:16FromDiscord<Lunar> but
17:14:25FromDiscord<Lunar> I'm currently developing on a different partition
17:14:33FromDiscord<Lunar> *Specifically L:/*
17:14:44FromDiscord<Lunar> when I run the file the first time, everything is okay
17:14:53FromDiscord<Lunar> It compiles good, and it runs fine
17:15:12FromDiscord<Lunar> Now when I edit the file, save it, then try the *exact same thing*
17:15:14disruptekyou need a devel version of the compiler.
17:15:26disruptekit was a lil bug that made it into 1.0 release on windows.
17:15:33FromDiscord<Lunar> I get the error:
17:15:33FromDiscord<Lunar> ```oserr.nim(94) raiseOSError
17:15:33FromDiscord<Lunar> Error: unhandled exception: The filename, directory name, or volume label syntax is incorrect.
17:15:34FromDiscord<Lunar> [OSError]
17:15:34FromDiscord<Lunar> ```
17:15:39FromDiscord<Lunar> So everyone is aware of it?
17:15:59disruptekwell, now they are. wish you had kept silent about it. 😉
17:16:05FromDiscord<Lunar> Lmao 😂
17:16:26disruptektry a nightly.
17:17:01FromDiscord<Lunar> Will do
17:18:13*daddoo quit (Quit: Leaving)
17:18:42federico3awr1: purity? It's quite inconsistent.
17:19:33FromDiscord<Lunar> Happens to me anytime I use Visual Studio Code
17:19:36FromDiscord<Lunar> Using the command:
17:19:51FromDiscord<Lunar> ```nim c -r "l:\Desktop\App\Nim\examples\example_01_basic_app.nim"```
17:20:14FromDiscord<sealegs> When creating an exe file using `nim c -d:release filename` does anyone know how to hide console?
17:20:30FromDiscord<Lunar> Hide the console?
17:20:34solitudesf`--app:gui`
17:22:40FromDiscord<Lunar> Also, another bug: When the app/terminal/console/whatever gets done executing, the process `nimsuggest.exe` stays active in the currently executing directory. This prevents me from deleting the directory after the script is done.
17:22:44FromDiscord<Lunar> Trying to nightly now
17:23:01FromGitter<awr1> @federico3 i don't really disagree. but i think the go people think their language is "pure"
17:23:34FromGitter<awr1> primarily via their ethic of "not being too flashy"
17:26:25solitudesfnimsuggest is launched by vscode extension s
17:26:38shashlick@disruptek I'm out for 5 hours but totally open to your feedback on feud
17:26:43shashlickThanks in advance
17:26:48disrupteknp
17:27:07disrupteki just realized where the -static came from, so that helps. 🙄
17:27:37FromGitter<awr1> i havent really tried feud but is it "mouseless"
17:28:04disruptekit is if you want it to be.
17:28:13disruptekit's BYOM
17:29:07FromDiscord<Lunar> Solirudesf: Ty
17:29:36shashlickThere's nothing to click really
17:29:46shashlickSo mouseless
17:31:26FromDiscord<Lunar> Bug 1 I mentioned earlier is fixed in nightly release 1.0.99
17:35:57*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
17:36:10*pbb joined #nim
17:36:55*pbb quit (Client Quit)
17:37:08*pbb joined #nim
17:40:38*navinmistry joined #nim
17:44:11disruptekwoot, it runs.
17:44:53*navinmistry quit (Ping timeout: 245 seconds)
17:48:44disrupteki can't really tell the difference between toggling the interior pointers flag, though.
17:56:39*whaletechno joined #nim
17:58:51*skoude joined #nim
18:00:52disruptekshashlick: here's my hack to make it build on linux: https://github.com/disruptek/feud/commit/013f0d3e47cb193976cc35c5db9bac8dc00c06d3
18:02:57*skoude quit (Ping timeout: 245 seconds)
18:10:37FromGitter<dawkot> Does completing a future externally make the async proc stop?
18:10:55FromGitter<dawkot> Or, what's the idiomatic way to stop async procs externally
18:11:29Araqyou mean 'cancel' a future?
18:12:06FromDiscord<Lunar> I honestly thought you said "what's the **idiotic** way to stop async procs". I was about to give you a whole list 😂
18:14:01clyybberAraq: Are you working on a blog post/article?
18:14:35Araqnot really, why?
18:15:07Zevvis there not new 1.0 release for the windows-recompile issue?
18:15:11clyybberI just faintly remembered someone stating in IRC that you are
18:15:40clyybberBut my memory is failing me
18:16:45Araqwell I'm torn between "Nim for C++ programmers" and "Memory management in Nim"
18:17:08AraqZevv: we wait for 2 weeks and then 1.0.2 will be released
18:17:26FromDiscord<Lunar> Forget about Nim 1.0.1
18:17:27FromDiscord<Lunar> ¯\_(ツ)_/¯
18:19:01FromDiscord<SrMordred> Is there a way to use less memory for building nim?
18:19:01FromDiscord<SrMordred> I´m trying to build nim on a small f1.micro instance on google cloud (with choosenim) and it blows memory on the process(f1.micro have only 0,6 GB of mem).
18:19:02FromDiscord<SrMordred> there is a way to solve this?
18:19:15clyybberAraq: Did you see https://github.com/nim-lang/Nim/issues/12273 ? Any idea on how to debug this?
18:20:06AraqSrMordred: compile with -d:leanCompiler
18:20:35Araqclyybber: check the C code for invalid array sizes
18:21:23clyybberK, thanks. Btw https://github.com/nim-lang/Nim/pull/12284 is green :)
18:22:46FromGitter<dawkot> > *<Araq>* you mean 'cancel' a future? ⏎ ⏎ yes
18:22:49Araqadditions[i].add(block: # meh, not really style that I consider battle-tested
18:23:08Araqdawkot: only 'chronos' supports that
18:23:59shashlickNice
18:24:01FromDiscord<Lunar> Chronos, as in ChromeOS?
18:26:21clyybberAraq: It's not the cause. Also I don't think its the array sizes since it works fine for --newruntime and all other gcs
18:26:40Araqclyybber: try --newruntime with valgrind
18:26:48clyybberI did
18:26:51clyybberNo leaks at all
18:26:51Araqand with -d:useMalloc
18:27:03clyybberAh, right. Perhaps I forgot that
18:28:48clyybberHmm, it leaks a bit, but no errors
18:28:51clyybberWill investigate
18:29:17Araqbtw is your refactoring based on my PR?
18:30:16clyybberAraq: No, because I got so many conflicts when trying to rebase your PR on devel, that I didn't understand the code anymore
18:30:27Araqbah
18:30:36clyybberBut I diffed yours and mine and looked at the changes while at it
18:30:48AraqI never really understood your refactoring :P
18:32:00FromDiscord<Lunar> Rip 😂
18:34:05*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:35:48clyybberHeh, it should be a bit simpler now. Basicallly you can pass a proc to p to process the subexpressions (like the last son of a nkStmtList and so on), which is useful for moveOrCopy.
18:36:13clyybberAnd in pArg there are some changes for the "partially initialized object"
18:36:16clyybberoptimization
18:36:23clyybberAnd also in p for discard statements
18:38:48Araqwhat's wrong with my refactoring? it was simple :P
18:39:09Araqunfortunately every test was red with it but it can't be hard to figure it out
18:40:15clyybberAraq: Every test was red because it was too simple :P
18:41:55clyybberAlso, merging pArg with p makes the partially initialized object optimization impossible AFAICT
18:42:37clyybberBut of course, the code you wrote yourself is always going to be the most understandable :D
18:43:16clyybberBtw, we did intend on removing cursor variables right?
18:43:44Araqright
18:44:18FromGitter<zacharycarter> Hi shashlick: sorry to be bugging you so much but I seemed to have stumbled upon another nimterop issue maybe
18:44:31shashlickSure what's up
18:44:49FromGitter<zacharycarter> let me make a gist of what I'm trying to do
18:45:18FromGitter<zacharycarter> https://gist.github.com/zacharycarter/b400d1139190f03237e08208e24b7f13
18:45:45FromGitter<zacharycarter> just edited the gist and added output.txt
18:46:08FromGitter<zacharycarter> https://github.com/floooh/sokol/ - is the library I'm attempting to wrap
18:46:36FromGitter<zacharycarter> even though I have an onSymbol callback defined, leading underscores don't seem to be removed in every case
18:48:44clyybberAraq: So can we remove the sfCursor flag or will that break something?
18:49:16AraqI don't think it's used anywhere
18:49:56shashlickWhat does C:\Users\carte\AppData\Local\Temp\nimterop_7152145496131043599.nim look like
18:50:21shashlickSee those lines to see what the rendered Nim code is
18:50:57FromGitter<zacharycarter> sure so the first line complained about
18:51:06FromGitter<zacharycarter> `C:\Users\carte\AppData\Local\Temp\nimterop_1255310357283381704.nim(606, 28) Error: invalid token: _ (\95)`
18:51:16FromGitter<zacharycarter> looks like: `SG_SLOT_MASK* = ((1 shl _SG_SLOT_SHIFT)-1).Enum_sokol_gfxh2`
18:51:42FromGitter<zacharycarter> and the line above it is - `SG_SLOT_SHIFT* = (16).Enum_sokol_gfxh2`
18:52:12ZevvSrMordred: did you manage? There are some simple workarounds
18:52:37FromGitter<zacharycarter> maybe it's because the enum refers to another entry defined in the same enum?
18:52:51*nsf quit (Quit: WeeChat 2.5)
18:55:22ZevvI wanted to compile list of -d flags for some time, I now see there is an issue for that
18:55:44ZevvWhould would be a good approach?
18:55:57ZevvGrepping and cutting for 'defined' gives quite a lis
18:56:47Zevvhttp://ix.io/1Xn2
19:03:01FromGitter<zacharycarter> welp going to sleep, maybe I'll figure something out tomorrow to fix this
19:05:25*skoude joined #nim
19:07:47*endragor joined #nim
19:09:28*kungtotte quit (Quit: WeeChat 2.6)
19:10:46*kungtotte joined #nim
19:10:52*skoude quit (Ping timeout: 245 seconds)
19:14:02*endragor quit (Ping timeout: 240 seconds)
19:30:46disruptekchronos is a 3d-party implementation of async that is feature-strong but outside the stdlib.
19:41:04disruptekjust look at how natural these words are: https://github.com/nim-lang/RFCs/pull/169#issuecomment-536333817
19:41:20shashlick@zacharycarter that's a corner case - the enum value is passed thru as is without onSymbol processing
19:41:32shashlickI think there's already a defect on it
19:41:52disruptekthat looks like the code you changed for my rdf wrapper.
19:42:07shashlickYou might have to cOverride those specific values or cSkipSymbol
19:43:43FromDiscord<SrMordred> @Zevv din´t know how to do it with choosenim, so i´m trying to build nim from source. the compilation didn´t explode memory yet, but i´m stuck on it 30 min now.
19:43:43FromDiscord<SrMordred> what alternatives do i have?
19:45:29shashlickWhat is the target arch?
19:50:32FromDiscord<SrMordred> ubuntu-minimal (google cooud f1.micro)
19:50:35FromDiscord<SrMordred> cloud*
19:51:32shashlickIs it devel?
19:51:45shashlickThere's Linux nightlies builds with binaries
19:51:51shashlickAnd even for the release
19:52:44shashlickNo need to compile if you don't absolutely have to
19:54:16FromDiscord<SrMordred> @shashlick forget about this possibility, will check out (eternal windows user struggling on linux 😛 )
19:56:16disruptekor just ship a native binary as an aws lambda runtime and don't pay to run the machine when your code isn't running.
19:58:44dom96dawkot: what's your use case for stopping an async proc?
19:59:00dom96what are you trying to do?
19:59:37FromDiscord<treeform> owl_000, what kind of seq do you want? seq of what?
19:59:57*theelous3 quit (Ping timeout: 240 seconds)
20:00:30FromDiscord<treeform> @Lunar yes you still need an Apple device. Apple requires it in order to ship an app on the iOS App Store.
20:00:38FromDiscord<Kiloneie> #6 boiz ! longest one ever
20:00:38FromDiscord<Kiloneie> LINK: https://youtu.be/vSvVVB9ggCA
20:01:29FromDiscord<treeform> @shashlick yeah text is really hard. That was a good article
20:02:02FromDiscord<treeform> disruptek, thanks I will give your GCP lib a try!
20:02:47disruptekyeah, let's scheme how the calls should be composed. it should be improved. also, we will want to parse responses, etc.
20:02:50ZevvSrMordred: it's dirty, but creating a swap file for the duration of the compilation will help you through
20:02:53FromDiscord<treeform> disruptek, Its strange to me that you where not able to build my jwt on linux. I build it on linux everyday.
20:03:25ZevvIt's not fast but it will get you there. as root: `dd if=/dev/zero of=/swap bs=1M count=1024; mkswap /swap; swapon /swap`
20:03:25disrupteki got some missing symbols and wasn't able to link.
20:03:52FromDiscord<treeform> @Shield, I though my cairo bindings where part of nimble?
20:04:01*clyybber quit (Quit: WeeChat 2.6)
20:04:39FromDiscord<treeform> @Kiloneie you are on the roll with the vids
20:05:04FromDiscord<Kiloneie> Thank you. I was planning on making 2 of such length today, but friends came over...
20:05:21FromDiscord<Kiloneie> tomorrow might be day #1 of dual video... maybe, no promises 😛
20:05:42FromDiscord<treeform> disruptek, linking? probably due to openSSL wrong version.
20:06:13ZevvKiloneie: do you still prepare all your scripts and all, or is it more improvised?
20:06:38FromDiscord<SrMordred> @Zevv uff, way to much for me.
20:06:51ZevvSrMordred: just cut and paste :)
20:07:04disruptektreeform: if you can make your branch work as well as yuriy's then we can switch to yours. otherwise, i can't test it.
20:07:17FromDiscord<Kiloneie> i still make scripts, then when i start rolling, it's a bit of both(mostly scripted because i can't remember what im doing D: nor speak fluidly for long, took me 29 clips today, probably like 60 recording button presses)
20:07:18AraqKiloneie: gah, could have asked me
20:07:24FromDiscord<SrMordred> @shashlick nightly builds worked for me, thanks
20:07:32Araqdo you show the strscans module?
20:07:45Araqit's what you need to show...
20:07:51ZevvKiloneie: you sound more relaxed, you're getting the hang of it
20:08:23ZevvI tried to record an introduction video for one of my libs, but I can't do it. I feel like an utter moron home alone talking to my compter.
20:08:26FromDiscord<Kiloneie> @Araq eh ? no idea what you mean
20:08:41disruptekyeah, it's hard to get used to talking into a mic.
20:08:54FromDiscord<Kiloneie> i had 4 months of training , 5 months ago 😛
20:08:54ZevvAraq: that's advanced stuff, he just started parseInt
20:09:03FromDiscord<Kiloneie> i mean it ended 5 months ago of 4 months
20:09:18AraqZevv: using it is not advanced and most people don't know it :-(
20:09:18disruptekis there a 9 in there anywhere?
20:09:22*navinmistry joined #nim
20:09:30FromDiscord<treeform> disruptek, I was making a spreadsheet of which Nim supports which openSSL version, turns out its a big mess: https://docs.google.com/spreadsheets/d/1JgbQS5e2I5bEzFaVYbYrt714CoWGHj-gRIovd7MUfMw/edit#gid=0
20:09:31Araqand are stuck in the dark ages with split()
20:09:41dom96Kiloneie: next step: https://videos.nim-lang.org. A quick web app which lists all Nim videos for newcomers, up for implementing it? :)
20:10:03FromDiscord<SrMordred> @Zevv nightly solved my problem. btw, apt install nim get the 0.19 version
20:10:07ZevvAraq: true
20:10:11FromDiscord<treeform> Nim claims its supports "libssl0.9.9.so" but it was never released 😃
20:10:17ZevvSrMordred: also good :)
20:10:30disruptektreeform: i'm on 1.1.1 and i could maybe go to 1.02 but i don't wanna...?
20:10:49FromDiscord<treeform> disruptek, that makes sense
20:10:56Zevvtreeform: time to start our native SSL implementation it seems :(
20:11:12Araqthere is BearSSL and I wrapped it once
20:11:18FromDiscord<Kiloneie> @dom96 maybe, does that link include a list ? it ain't working
20:11:19Araqno idea if the code is on github
20:11:36dom96Kiloneie: It doesn't exist. I'm saying we should create it.
20:11:37disruptekwhy don't we just not use it. can't we reimpl signing for google w/o that jwt impl?
20:11:42FromDiscord<treeform> disruptek, I had to stick with open SSL 1.0.0 because that is what PG uses and I need to use PG.
20:11:46FromDiscord<Kiloneie> oh ok
20:11:47ZevvMaybe we should ship with a small SSL alternative
20:11:48FromDiscord<treeform> Its a big mess of openSSL crap.
20:11:53Zevvbear would be a good start
20:11:54disruptekPG?
20:12:01FromDiscord<Shield> @treeform it doesn't seem like it, I looked in nimble and it only showed an old library, I had to search github because I know how many libs doesn't show up in the package manager
20:12:32FromDiscord<treeform> disruptek, libpostgresql , it binds to a different openSSL.
20:12:40FromDiscord<Shield> also the name of your lib is quickcairo but the examples import `cairo`, other than that it works great, thanks for the dll too
20:12:45disruptekanyway, ssl is something we should really delegate/coordinate with mratsim and status.
20:13:15disruptektreeform: ah, okay. but that helps sell me on just reimplementing signing myself.
20:13:22FromDiscord<Kiloneie> i would definitely want to implement something like that, but(i don't actually know much of Nim, just some bits and pieces D:)
20:13:28disrupteki will take a look this week.
20:13:33FromDiscord<treeform> @Shield, oh now I remmber I asked Araq to maybe take over his version of Cairo that does not compile any more. Araq said No. He did not like how the formatting in my wrapper looked. So I guess I just left it.
20:13:38*navinmistry quit (Ping timeout: 245 seconds)
20:14:15dom96Kiloneie: best way to learn is to work on a small project :)
20:14:21Araqhuh?
20:14:32AraqI said "no"?
20:14:32FromDiscord<treeform> disruptek, I don't know how hard is to just make the signing code in nim. I want to investigate it as well.
20:15:00disrupteki would be really surprised if i couldn't do it in a day or two.
20:15:07Araqbecause of formatting?
20:15:09FromDiscord<treeform> Araq, yeah you where very negative about my version.
20:15:14Araqdoesn't sound like me
20:15:16FromDiscord<treeform> So I just abandoned the project.
20:15:40Araqwell new Araq is here, please fix our cairo wrapper
20:15:45disrupteklol
20:16:08FromDiscord<Kiloneie> Yeah i know, my project right now is videos xD... trying to get myself to get 8-10 min long ones twice a day, after that which could start tomorrow, i will try some stuff(gotta know what i am talking about anyways)
20:16:26Araqextra points if your fix doesn't rewrite everything so that I can look at the diff without going insane...
20:16:54Zevvyay, araq-points! \o/
20:16:55FromDiscord<treeform> Araq, yeah that is what you wanted last time. You wanted me to fix it, while I did a full rewrite.
20:17:16disruptekthe absence of points isn't negative points.
20:17:24FromDiscord<treeform> So we are stuck with broken version in nimble and working version not in nimble.
20:18:11Araqyummy
20:18:23FromDiscord<treeform> At that point I was no longer emotionally invested with Cairo and forgot about it.
20:18:27Araqwell we can also embrace your version I guess
20:19:10*disruptek lets slip a tear.
20:19:13disruptekhug it out
20:19:23ZevvDo any of these bindings use glib introspection stuff to generate the stuff? (Gir it is called iirc)
20:19:52FromDiscord<treeform> I think there are 4 different cairo wrappers
20:20:54FromDiscord<Shield> is there another library for making images i should be aware of? so far cairo is blazing fast
20:21:29FromDiscord<treeform> I wrote one called flippy - but its more for bitmaps and interchange format.
20:21:39FromDiscord<treeform> It does not do the stuff the cairo does.
20:21:56FromDiscord<Shield> maybe a helper function to handle writing to memory instead of a file would be a nice bonus for your cairo bindings
20:22:31FromDiscord<treeform> that is there, see the example?
20:22:39FromDiscord<treeform> https://github.com/treeform/quickcairo/blob/master/examples/realtime_glfw.nim
20:22:49FromDiscord<treeform> `var dataPtr = surface.imageSurfaceGetData()`
20:23:22*def- joined #nim
20:24:26AraqZevv: my bindings don't use 'gir', I don't see the point
20:25:36Araqthey took all the effort of implementing this mess in freaking C for its "interop advantages" and then said "screw it, we'll add introspection for the wrappers". Brilliant.
20:25:45ZevvI must admit I don't know the details, but I understood that gir should help in automatically create higher level bindings
20:26:04lmariscalis there a way to detect backends? I have been looking through docs but not finding it
20:26:20Zevvfair enough
20:26:36Araqlmariscal: defined(cpp) # c++
20:26:41Araqdefined(js)
20:26:59lmariscalthanks!
20:27:06Araqwhen not defined(cpp) and not defined(js) # C
20:27:16FromDiscord<Shield> i missed that one, but i meant for this `writeToPngStream`
20:27:28AraqI dunno if the C target has a define
20:27:38FromDiscord<treeform> I want to make nim UI development better. It crazy to me that programmers still layout buttons and stuff in code. I want to use a UI/UX editor to export to Nim to make UIs. I really good UI tool is Figma, I made a plugin for Figma to export to my UI library's nim code. So I wanted to share a screenshot: https://cdn.discordapp.com/attachments/142827852402917376/627542235185152003/unknown.png
20:28:33FromDiscord<treeform> @Shield, you right I don't have that.
20:29:03Araqnever heard of Figma
20:29:23Araqwhat widget set does it use? (qt, wxWidgets, ...)
20:29:57FromDiscord<treeform> No UI is done with widget sets any more? So not any of them.
20:30:11FromDiscord<treeform> It has libraries were you can import that different styles though.
20:30:35FromDiscord<treeform> Like Material Design 2.0: https://www.figma.com/resources/assets/material-design-themeing-ui-kit/
20:31:50Araqso it's web based?
20:31:57FromDiscord<treeform> Figma sits with other UI programs like sketch, adobe xd, or adobe illustrator.
20:32:07FromDiscord<treeform> yeah its web based
20:32:17FromDiscord<treeform> before that I use Sketch - which was Mac only. Even worse.
20:32:41FromDiscord<Kiloneie> Is it possible that my videos besides the first one didn't get as much views because i freaking forgot to include the first one into the playlist ?
20:32:42FromDiscord<treeform> Then you get to adobe products which are really hard to write plugins for.
20:33:35FromDiscord<treeform> I feel like every one in the UI/UX space is switching to Figma.
20:33:58disruptekwow, people are leaving sketch?
20:33:59FromDiscord<treeform> Recently Microsoft.
20:34:11FromDiscord<treeform> Where I work too.
20:34:20AraqKiloneie: maybe but I would expect that most people want more advanced content.
20:34:41Yardanico@treeform I think fidget could become a very popular UI lib in nim if it gets support for native targets :)
20:34:42AraqI mean content about Nim's advanced features
20:35:04FromDiscord<treeform> @Kiloneie people in this channel are more advanced. It does not mean we don't need videos for new people. But they have to come from some place other then this channel.
20:35:49FromDiscord<treeform> @Yardanico This is all done with Fidget: https://media.discordapp.net/attachments/318464031536971777/625030685660545044/unknown.png
20:36:13FromDiscord<treeform> @Yardanico iOS, Android, Mac Native and web. (Windows and Linux also work)
20:36:20Yardanicoso is it already usable on native targets like linux? 0_0
20:36:22Yardanicoim gonna try it :D
20:36:36FromDiscord<Kiloneie> Yeah, it figures, will take time for beginners to really find my videos and views go up, by then i will probably get to more advanced stuff. Should really start doing some side projects(useful ones)
20:36:36FromDiscord<treeform> Its "usable" but its not even alpha.
20:36:56FromDiscord<treeform> Yardanico, if you have any feedback on where you get stuck that would be great.
20:38:18FromDiscord<treeform> @Yardanico, my hope is you can just draw the UI out in Figma, export it to Fidget and just have it run everywhere:
20:38:28FromDiscord<treeform>
20:38:28FromDiscord<treeform> https://cdn.discordapp.com/attachments/371759389889003532/627967454961860628/unknown.png
20:38:57FromDiscord<treeform> That's nim code in the export.
20:38:58*snooptek quit (Remote host closed the connection)
20:39:13Yardanico@treeform does it work with figma kits or not yet?
20:39:41*snooptek joined #nim
20:41:28*narimiran quit (Remote host closed the connection)
20:42:08Yardanicoand where do I get that fidget export? :P
20:42:32FromDiscord<treeform> Yardanico, its limited to what it can draw right now. Only very basic Figma features are supported.
20:43:00FromDiscord<treeform> Most kits probably use fancy borders and shadows etc I don't have yet.
20:43:52*daddoo joined #nim
20:45:22FromDiscord<treeform> Yardanico, I am still working on the exporter. I it will be in the fidget repo or through the Figma online plugin portal.
20:45:37*snooptek quit (Remote host closed the connection)
20:45:57*snooptek joined #nim
20:48:15FromDiscord<treeform> I think all UIs will look kind of like how web and mobile UIs look now. No one makes standard desktop apps with native controls. They are just not in style anymore.
20:50:11Yardanico@treeform, well I had to install dependencies myself (by looking at the error of trying to import a package which doesn't exist), and now I get compiler errors because prettyPrint can't take a GLenum argument (on lines 50 and 93 in textures.nim)
20:52:54Calinouthey're still in style in some cases (system utilities), but they're becoming more niche indeed
20:53:15FromDiscord<treeform> @Yardanico you on 1.0 nim? Which OS?
20:53:18Calinouhowever, most user-facing apps will end up not trying to look native anymore, I guess
20:53:27Yardanico@treeform sorry, not 1.0.0, but latest devel compiler
20:53:33Calinou(you better hope they have a dark theme option :P)
20:53:34Yardanicoafter commenting them out it compiled, but errors at runtime because the fragment shader wasn't compiled
20:53:45YardanicoArch Linux with RX 570 gpu
20:53:58Yardanico(yes finally bought a bit newer GPU instead of my old gtx 750)
20:53:59FromDiscord<treeform> @Yardanico, which example are you running?
20:54:31FromDiscord<treeform> @Yardanico, what is the shader error?
20:55:40Yardanico@treeform https://paste.debian.net/plain/1103307
20:55:54YardanicoI just tried to export a simplest stuff in fidget with fidgetgen, and then run it
20:56:09Yardanico(well also had to add a drawMain proc and startFidget() )
20:56:43FromDiscord<treeform> I see nice. This is all that should be needed
20:56:44Yardanicoah it's probably an issue with my drivers or something like that
20:57:09FromDiscord<treeform> for some reason your GPU does not support `GL_EXT_gpu_shader4`
20:57:23FromDiscord<treeform> I would probably need to not use that feature...
20:57:42Yardanicowell it seems it does: https://gitlab.freedesktop.org/mesa/mesa/merge_requests/667
20:57:56Yardanicoand the bugreport https://bugs.freedesktop.org/show_bug.cgi?id=110431
20:58:39FromDiscord<treeform> @Yardanico thanks! That's the kind of feedback I need.
20:59:04FromDiscord<treeform> I can just not use `GL_EXT_gpu_shader4` in my shader
20:59:09FromDiscord<treeform> and pass the texture size instead
21:00:10FromDiscord<treeform> that is there for masking what if you uncomment the other lines?
21:01:32FromDiscord<treeform> @Yardanico this should work for simple cases: https://gist.github.com/treeform/0eaffea1b2bea5309227ccc0553a5514
21:01:59FromDiscord<treeform> I have to go for now. But I will be back. Thank you for trying it out.
21:02:27*snooptek quit (Remote host closed the connection)
21:07:44*snooptek joined #nim
21:10:43*skoude joined #nim
21:11:14*endragor joined #nim
21:14:50*skoude quit (Ping timeout: 240 seconds)
21:17:32*endragor quit (Ping timeout: 245 seconds)
21:35:37*solitudesf quit (Ping timeout: 240 seconds)
21:35:50*Vladar quit (Remote host closed the connection)
21:36:31FromGitter<zacharycarter> shashlick: `cSkipSymbol` does nothing and `cOverride` requires that I also override any other referenced values - so I end up having to override a bunch of things
21:37:57*Ven`` joined #nim
21:37:58FromDiscord<SrMordred> i got a strange error trying to use jester with websocket on linux
21:37:58FromDiscord<SrMordred> ```proc newWebSocket(req: Request): Future[WebSocket]
21:37:58FromDiscord<SrMordred> first type mismatch at position: 1
21:37:59FromDiscord<SrMordred> required type for req: Request
21:37:59FromDiscord<SrMordred> but expression 'getNativeReq(request)' is of type: Request```
21:38:01FromDiscord<SrMordred> but on windows it compiles without error o.O
21:40:30shashlick@zacharycarter you couldn't skip the enum being defined?
21:41:10FromGitter<zacharycarter> oh I guess I did the wrong thing, let me try that
21:42:30FromGitter<zacharycarter> well yeah that works but references in other objects to entries in that enum are still problematic
21:42:56FromGitter<zacharycarter> meh, guess I won't use sokol for now with Nimterop
21:43:12shashlickYou could just override it to the actual value
21:43:23shashlickIf you need it
21:43:50FromGitter<zacharycarter> I tried that but it's referenced in a few spot
21:43:53FromGitter<zacharycarter> spots*
21:44:19FromGitter<zacharycarter> basically to fix things I have to `cOverride` several enum entries and several types
21:44:32FromGitter<zacharycarter> and then there's not much point in the whole thing
21:45:38shashlickWell instead of a value relative to another, why not calculate actual value and declare that
21:47:04FromGitter<zacharycarter> I'll show you what I mean, one moment
21:47:53shashlickBasically we need this https://github.com/nimterop/nimterop/issues/133
21:48:03*asymptotically quit (Quit: Leaving)
21:50:15FromDiscord<exelotl> uh oh, something changed between 0.20.2 and 1.0.0
21:50:19FromDiscord<exelotl> https://cdn.discordapp.com/attachments/239878713016188939/627985335728472064/goodboy-galaxy-0.png
21:50:26FromDiscord<exelotl> https://cdn.discordapp.com/attachments/239878713016188939/627985338635255818/goodboy-galaxy-1.png
21:52:20FromGitter<zacharycarter> https://gist.github.com/zacharycarter/4109e51a1ac760685909901301802e7c
21:52:20*snooptek quit (Remote host closed the connection)
21:52:24FromGitter<zacharycarter> I have to start doing that to fix things
21:52:34FromGitter<zacharycarter> and then all of those different types also have to be defined in the cOverride section
21:52:39FromGitter<zacharycarter> so I might as well just wrap it with c2nim
21:53:07shashlickIf it works sure
21:53:18shashlickJust change cImport to c2nImport
21:53:39shashlickYou get all the other benefits of nimterop
21:54:23shashlickWell doesn't look like you are pulling the repo or building with getHeader
21:54:41shashlickBut c2nImport will run the preprocessor for you
21:54:54FromGitter<zacharycarter> no I'm not
21:55:17FromGitter<zacharycarter> yeah - still not working, I don't think the preprocessor is being run
21:55:37FromGitter<zacharycarter> meh
21:56:34FromGitter<zacharycarter> going to go back to trying to sleep :p will play around with it more tomorrow
21:56:37shashlickIt does https://github.com/nimterop/nimterop/blob/master/nimterop/cimport.nim#L589
21:56:53shashlickIs that your current wrapper
21:56:58shashlickI'll look into it later
21:57:02shashlickWhich os
21:58:08FromDiscord<exelotl> oh weird... the issue is not in the game code, but in my tool that converts assets into the raw formats that the GBA can use
21:58:36FromDiscord<exelotl> that's good, easier to debug I guess
21:59:24shashlick@zacharycarter looks like we've been here before https://irclogs.nim-lang.org/04-01-2019.html
22:02:03*theelous3 joined #nim
22:10:35FromDiscord<SrMordred> I´m making some dumb mistake or should i report an issue?
22:10:35FromDiscord<SrMordred> https://play.nim-lang.org/#ix=1XnL
22:22:14FromDiscord<exelotl> how do I install a specific branch of a package with nimble?
22:23:13shashlickPackage@#branch
22:23:18shashlickOn cli
22:23:37shashlickAnd package#branch in nimble file
22:25:12*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
22:25:27*pbb joined #nim
22:25:47FromDiscord<exelotl> something's not working here :\ https://dpaste.de/wpH4
22:26:20FromDiscord<exelotl> maybe it doesn't like the . in the branch name?
22:28:38shashlickNimble issue - what version of nimble you have
22:30:08FromDiscord<exelotl> looks like I was using 0.10.2, I'll try with the latest version
22:30:43shashlickOr you could just delete C:\msys32\tmp\nimblecache
22:34:26*rockcavera joined #nim
22:43:10FromDiscord<exelotl> looks like it is fixed on the latest, good to know x)
22:47:48*daddoo quit (Quit: Leaving)
22:50:45shashlickCool
22:51:39*krux02 quit (Remote host closed the connection)
22:57:26zedeusZevv: since nobody else mentioned it, gintro is exactly that
22:57:57*snooptek joined #nim
23:03:31*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:08:43*sealmove joined #nim
23:14:57*endragor joined #nim
23:22:17*endragor quit (Ping timeout: 240 seconds)
23:33:54FromDiscord<treeform> @SrMordred that's a very strange issue, what if you set native request to a variable? Make sure to fully type qualify it (with module name) is it a ws or jester issue?
23:35:41*theelous3 quit (Ping timeout: 276 seconds)
23:41:52FromDiscord<SrMordred> ```nim
23:41:52FromDiscord<SrMordred> var nat_req: asynchttpserver.Request = getNativeReq(request)
23:41:52FromDiscord<SrMordred> ```
23:41:52FromDiscord<SrMordred> Still compiles ok on windows
23:41:53FromDiscord<SrMordred> Linux:
23:41:54FromDiscord<SrMordred> Error: type mismatch: got <Request
23:41:54FromDiscord<SrMordred> > but expected 'Request = object'
23:42:44FromDiscord<SrMordred> ```nim
23:42:44FromDiscord<SrMordred> var nat_req: asynchttpserver.Request = getNativeReq(request)
23:42:44FromDiscord<SrMordred> var ws = await newWebSocket(nat_req)
23:42:45FromDiscord<SrMordred> ```
23:42:45FromDiscord<SrMordred> Still compiles ok on windows
23:42:45FromDiscord<SrMordred> Linux:
23:42:47FromDiscord<SrMordred> Error: type mismatch: got <Request
23:42:47FromDiscord<SrMordred> > but expected 'Request = object'
23:46:14FromDiscord<SrMordred> @treeform oh, i think i got it
23:47:28FromDiscord<SrMordred> @treeform jester uses httpbeast if possible, but it only works on linux, rigth?
23:47:28FromDiscord<SrMordred> NativeRequest* = httpbeast.Request (for httpbeast)
23:47:29FromDiscord<SrMordred> NativeRequest* = asynchttpserver.Request (others)
23:47:29FromDiscord<SrMordred> but httpbeast.Request its not the same thing
23:48:47FromDiscord<exelotl> wtf so I've tracked my problem down to writeFile itself?
23:49:22FromDiscord<exelotl> lemme try and find a minimal example
23:54:12FromDiscord<SrMordred> @treeform well, i´m happy with this. I´m new to nim and feeling very confortable on reading projects source code. kudos for Nim 🙂