00:17:47*SenasOzys_ quit (Read error: Connection reset by peer)
00:18:26*SenasOzys joined #nim
00:19:07*SenasOzys quit (Remote host closed the connection)
00:19:30*SenasOzys joined #nim
00:21:04*SenasOzys quit (Read error: Connection reset by peer)
00:21:21*SenasOzys joined #nim
00:22:32*SenasOzys quit (Remote host closed the connection)
00:23:00*SenasOzys joined #nim
01:06:08*xet7 quit (Quit: Leaving)
01:44:51*icebattle quit (Ping timeout: 256 seconds)
03:43:22*smt` quit (Read error: Connection reset by peer)
03:43:54*smt joined #nim
03:51:14FromGitter<Varriount> Araq: It appears that toOpenArray wasn't causing the bounds check error, the fact that I was doing a `for` loop over an empty openarray was.
03:51:38FromGitter<Varriount> should `for index, value in emptyOpenArray` cause an out of bounds error?
04:13:08*leorize quit (Quit: WeeChat 2.1)
04:42:00*miran joined #nim
05:04:54FromGitter<diegogub> Hello, How do I parse this time 2018-04-02T21:20:48.647095988Z with Times package? I can't find the milliseconds reference
05:28:51FromGitter<gogolxdong> How to make a call in template like
05:29:07FromGitter<gogolxdong> ```template f(action):untyped= ⏎ action(users,msg)``` [https://gitter.im/nim-lang/Nim?at=5ad2e32327c509a77412b1e7]
05:31:29FromGitter<Varriount> @diegogub Looks like you might need to ignore milliseconds.
05:33:09FromGitter<diegogub> @Varriount yes, that's what I'm doing..but I'm losing that info...Guess I will have to reply with stirng
05:33:12FromGitter<diegogub> string
05:33:51FromGitter<Varriount> @diegogub You could also add a milliseconds format spec to the format() and parse() procedures.
05:44:01FromGitter<gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ad2e6a15f188ccc1567c2e0]
06:10:09*sz0 joined #nim
06:26:54*yglukhov quit (Remote host closed the connection)
06:27:14*yglukhov joined #nim
06:36:39*nsf joined #nim
07:01:47Araqgogolxdong: simply without the backticks
07:05:20Araq@varriount: it shouldn't
07:16:44*yglukhov quit (Read error: Connection reset by peer)
07:17:21*yglukhov joined #nim
07:18:13*yglukhov quit (Remote host closed the connection)
07:18:50*yglukhov joined #nim
07:20:42*rokups joined #nim
07:23:09*yglukhov quit (Ping timeout: 264 seconds)
07:26:46*miran quit (Ping timeout: 264 seconds)
08:17:19*sz0 quit (Quit: Connection closed for inactivity)
08:30:11*r3d9u11 joined #nim
08:45:51FromGitter<alehander42> i am gonna use jester for the first time
08:48:16FromGitter<alehander42> does it have special support for web sockets?
08:50:06Araqnot as far as I know
08:53:21*smt quit (Read error: Connection reset by peer)
08:53:44*smt joined #nim
08:58:47FromGitter<alehander42> hm, so is https://github.com/niv/websocket.nim usable?
08:59:10FromGitter<alehander42> I can see it's not stable, but I want to just prototype a simple board game multiplayer
08:59:23FromGitter<alehander42> so that's not too important
09:00:12Araqit went from rock-solid to unusable to unknown
09:00:56AraqI need to test it again, it is blocking my Ormin blog post
09:01:34*rauss quit (Read error: Connection reset by peer)
09:02:50Araq„When multiple typedesc params are present, they act like a distinct type class
09:02:50Araq(i.e. they will bind freely to different types). To force a bind-once behavior
09:02:51Araqone can use a named alias or an explicit `typedesc` generic param“
09:02:55Araqwtf ...
09:03:17*rauss joined #nim
09:03:24Araqthat is not how to design this feature ...
09:04:07Araqproc foo[T](x: typeDesc[T], y: int, z: typeDesc[T]) # that is a bind-once here.
09:17:09*ofelas quit (Ping timeout: 264 seconds)
09:21:58FromGitter<alehander42> ok, so what kind of client connects with websockets to a server, but not in the browser
09:22:27FromGitter<alehander42> is the websocket.nim client only for testing , or I am not seeing the usevase
09:24:09FromGitter<alehander42> if you already have a websocket server, you might want to reuse the websockets with a native client? I never thought of that
09:25:46*ofelas joined #nim
09:31:53Araqalehander42: check out how dom's snake game uses websockets
09:32:28AraqI copy&paste around this code all the time... :P
09:33:39FromGitter<alehander42> ah good idea
09:35:48FromGitter<mratsim> Regarding copy-paste seems like the Nim Cookbook guys are struggling with updates: https://github.com/btbytes/nim-cookbook
09:38:24FromGitter<alehander42> awesome I got it working anyway
09:38:37FromGitter<alehander42> just using the websocket object in nim js and websocket.nim on the server
09:40:27FromGitter<alehander42> yeah I think I do the same as dom in snake
09:40:44FromGitter<alehander42> good resource nevertheless
09:41:41FromGitter<alehander42> I'll probably make something simpler for now, with only 2 players supported
09:44:50*xet7 joined #nim
09:57:56*jaco60 joined #nim
09:57:56Araqmratsim: .md files and a makefile vs :test:, https://github.com/nim-lang/Nim/commit/70c0ff1be21d2a1fda6432fe2e5b7ae0953840ff
09:58:20AraqVorsprung durch Technik?
09:59:32FromGitter<mratsim> what is this “$1” magic?
10:00:09FromGitter<mratsim> Is test related to runnable examples?
10:01:02Araqyeah, it tests the command 'nim c <extracted_file_snippet>' returns 0
10:09:20dom96This is awesome https://forum.nim-lang.org/t/3758
10:11:05Araqwhy do I know what this points to without looking at it? :-)
10:14:32Araqhmm so the JVM doesn't support value based datatypes. but .NET does. did they ever explain why they didn't use that and went for wasm?
10:14:59Araqexcept from the rather obvious "ugh, M$ is evil"
10:19:04dom96fear of getting sued by MS?
10:20:04dom96Plus I doubt those VMs would work in a browser efficiently
10:20:42FromGitter<mratsim> I never associated Java and .NET with efficient (hint Jsp-let and asp.net)
10:25:31*yglukhov joined #nim
10:27:01dom96Araq: I could also ask you about your custom Nim VM, why not just use .NET? ;)
10:27:34Araqbecause my VM has native support for Nim's AST manipulations.
10:27:52Araqwasm has no support for DOM manipulations. see the pattern here? :P
10:28:51*yglukhov quit (Read error: Connection reset by peer)
10:29:24*yglukhov joined #nim
10:29:49Araqwasm needs DOM ops.
10:32:20AraqDOM ops will turn this thing from a toy into something very interesting.
10:35:55dom96Yeah yeah
10:36:03dom96I'm sure it's not far away
10:36:17FromGitter<mratsim> like Nim 1.0 and Half-Life 3?
10:36:25FromGitter<mratsim> (ok that’s a low blow)
10:36:30Araqhttps://github.com/WebAssembly/design/issues/960 :-)
10:36:49dom96hah, krux02 in there
10:36:57Araqkrux02 answered my question
10:37:05Araqit is a small world
10:42:18*NimBot joined #nim
10:45:45Araqmratsim: Half-Life 3 is confirmed! https://www.youtube.com/watch?v=fXgZGZMaUks
10:49:07*SenasOzys quit (Read error: Connection reset by peer)
10:49:14FromGitter<mratsim> 😅
10:49:43*SenasOzys joined #nim
11:01:15*noonien joined #nim
11:02:31livcdI saw the Blazor demo and it looks impressive.
11:05:26*fredrik92 joined #nim
11:05:32*fredrik92 quit (Remote host closed the connection)
11:14:41*smt quit (Ping timeout: 276 seconds)
11:43:30*Vladar joined #nim
12:02:45*yglukhov quit (Read error: Connection reset by peer)
12:03:18*yglukhov joined #nim
12:04:39FromGitter<arnetheduck> @Araq, why isn't deadcodeelim on by default, or even the only mode?
12:05:05FromGitter<arnetheduck> anything else sounds like a bug, it shouldn't even be listed as a feature, it's so obvious
12:05:23FromGitter<arnetheduck> remove it? make default on?
12:05:46FromGitter<arnetheduck> ie remove the option and make it the only mode
12:06:06Araqsounds good
12:06:22Araqthe JS backend never did anything else
12:08:09*SenasOzys quit (Ping timeout: 264 seconds)
12:12:29Araqgit pull https://github.com/FedericoCeratto/Nim.git blockdiag
12:12:30Araqdyld: Symbol not found: __cg_jpeg_resync_to_restart
12:12:30Araq Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
12:12:31Araq Expected in: /usr/local/lib/libJPEG.dylib
12:12:34Araq in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
12:12:44Araqgit broken, any ideas?
12:19:02*SenasOzys joined #nim
12:37:00skelettHow should I translate a VLA from an C Interface into nim? Is this a usecase for an `UncheckedArray`?
12:38:20*r3d9u11 quit (Ping timeout: 265 seconds)
12:45:25AraqI doubt that works for VLA
12:49:04skelettIs there another way I can access fields allocated as a VLA?
12:49:51*dddddd joined #nim
12:49:55Araqoh accessing should be fine
12:50:18Araqbut you can't put an UncheckedArray on the stack, the compiler doesn't understand it
13:01:09*PMunch joined #nim
13:01:51skelettThat's fine. I get a struct like this `struct foo { size_t len; uint8_t buf[0]; }` from a library
13:05:06*yglukhov quit (Remote host closed the connection)
13:07:44*Vladar quit (Quit: Leaving)
13:19:08*yglukhov joined #nim
13:20:40*yglukhov quit (Remote host closed the connection)
13:23:06*user1101 joined #nim
13:37:46*yglukhov joined #nim
13:38:02*xkapastel quit (Quit: Connection closed for inactivity)
13:44:39*krux02 joined #nim
13:45:07krux02hello people today I am on irc, because irc is cool and retro :P
13:53:17*Lord_Nightmare quit (Ping timeout: 276 seconds)
13:56:11*yglukhov quit (Remote host closed the connection)
13:57:57*Lord_Nightmare joined #nim
13:58:01FromGitter<dom96> You're damn right... Except when you're AFK :)
14:11:09krux02I like irc, because it is a bit less
14:11:15krux02focusing more on messages
14:11:22krux02and no so much about "notifications"
14:11:28krux02notifications are productivity killer
14:17:28*miran joined #nim
14:22:42skelettand no running browser
14:22:46skelettand less resources
14:22:55skelett*not running in a browser
14:33:14krux02well I have the browser open anyway for other stuff, such as documentation and github.
14:33:35krux02but the browser as so much productivity killing traps built into it.
14:34:00krux02I would say it's not recommendad for anyone to browse the internet without an ad blocking software.
14:34:27FromDiscord<geckojsc> I like IRC but it's not good when your internet is unstable :(
14:36:08krux02For me the biggest time killer is definively youtube.
14:36:33krux02but it is also so great for so many things
14:37:12krux02gdc talks, nim talks, music, Game Two (if you speak German)
14:39:05*cheng joined #nim
14:44:31PMunchSpeaking of Nim talks, me and couven92 will be holding one tomorrow at our university
14:44:47krux02cool, will it be on youtube?
14:45:14krux02I am at RWTH Aachen, I don't where your university is, but it is probably not very close to Aachen.
14:46:25PMunchNot very close at all unfortunately: https://www.google.com/maps/place/Tromsø/@69.6652343,18.8475394,12z/data=!3m1!4b1!4m5!3m4!1s0x45c4c4526c3b71fd:0x23dca858e6ebed3!8m2!3d69.6492047!4d18.9553238
14:46:59PMunchcouven92, all the rooms have video equipment right? So we could record the talk and put it on YouTube?
14:47:58krux02I would watch it.
14:49:08PMunchIt's going to be an introduction thing, so you both probably know everything we're going to say :P
14:49:11*PMunch quit (Quit: leaving)
14:49:41mirandoesn't matter, would +1 again :)
14:49:42*user1101 quit (Quit: user1101)
14:49:58*user1101 joined #nim
14:50:11krux02I can point out the wrong things you say :P
14:57:54*cheng quit (Ping timeout: 260 seconds)
15:18:58krux02I would like to see in the introduction of Nim that GC is thread local. A huge thing, because when you hate GC, you hate it because of stop the world for all threads and sits under everything.
15:22:16FromGitter<alehander42> @krux02 how do you even learn from videos, I find them the most horrible format for that
15:22:25FromGitter<alehander42> when I see something is available only as a video, I just ignore it
15:23:22FromGitter<alehander42> I dream of software that converts videos to annotated text with gifs and clips in the right
15:23:47krux02well when a video is the only thing, then I think it's bad, but often I think the core idea of something gets transmitted much better in video form than in text form
15:23:59miranjust mute the video and the gif part is solved :)
15:23:59FromGitter<alehander42> actually that's a grat idea anyway, but I guess speech recognition is still too bad
15:24:18FromGitter<alehander42> sometimes, but the random access thing is horrible
15:24:28FromGitter<alehander42> in text I can just ctrl+f or I can see the contents
15:24:39FromGitter<alehander42> if I could easily have an high level overview of a video
15:24:49FromGitter<alehander42> I could still watch the important parts for me
15:25:08krux02yea random access is very bad in video, that is why a video about something should never be structured like a reference manual. That would also be totally boring.
15:25:22FromGitter<alehander42> the same way you usually don't read text from line 1 to line 2000, you browse back and forth to the relevant parts
15:25:58krux02but videos you can't do that
15:26:25krux02but videos transport emotions like frustrations about problems and their solutions much better.
15:26:35krux02that makes it much more interesting to watch
15:28:07FromGitter<alehander42> yes, I admit sometimes it's very nice to watch a talk about something when you have time
15:28:07krux02when I just have the text form I often loose the interest right at the beginning.
15:28:24FromGitter<alehander42> but still it's cool to have the alternative option
15:28:38FromGitter<alehander42> because often I might want to watch 15-20 mins of 1h30min talk
15:28:43FromGitter<alehander42> which would be most relevant to me
15:28:48krux02A video does never replace good alternatives, but it is great to get you interested in something.
15:28:49FromGitter<alehander42> and I can't really do that with normal videos
15:28:55FromGitter<alehander42> without skipping and getting lucky
15:29:07krux02and videos often pointed me out to really good practices in c++
15:29:32krux02c++ conference talks, I really liked them especially when the person whod did it was cool.
15:29:41krux02the c++ people also look so funny
15:30:05FromGitter<alehander42> I find text entertaining because I can fast forward through it and easily see what's interesting
15:30:30krux02well I can also fast forward through video
15:30:33FromGitter<alehander42> maybe they're just better compressed
15:30:45FromGitter<alehander42> like, I can imagine reading so much stuff for 1 hour in a new field/topic
15:30:46krux02when someone talks to slowly, youtube has a 2x speed option
15:30:59FromGitter<alehander42> and getting 10-20% of this info trying to go though videos
15:31:01krux02I actually do that often with talks, because some people really speak slow
15:31:05FromGitter<alehander42> for example, you can't index videos
15:31:14krux02well you can index videos
15:31:16FromGitter<alehander42> so search is primitive
15:31:19FromGitter<alehander42> can you?
15:31:26FromGitter<alehander42> I haven't seen good search engines for that
15:31:28krux02most videos just aren't indexed
15:31:45krux02it is for sure improvable
15:31:50FromGitter<alehander42> well that means the tech isn't developed enough
15:31:53FromGitter<alehander42> yeah
15:32:17FromGitter<alehander42> :D maybe it's also my low attention span!
15:32:27FromGitter<alehander42> but I still think you can have best of both worlds
15:32:48FromGitter<alehander42> with remapping videos to structured text/video mapping
15:32:52krux02well and what I also like about it, I don't need to actively do something, I just watch it and relax. Other people might enjoy watching something on Netflix, I enjoy watching something from CppCon or GDC.
15:32:54FromGitter<alehander42> with a web app
15:33:40FromGitter<alehander42> hm my problem is if I don't interact with something, I get really bored
15:34:03FromGitter<alehander42> maybe I have to try to listen to stuff while I am doing something else
15:34:16krux02ok, that is a fair point. For me it is the other way around. Sometimes I just don't want to interact.
15:35:43krux02to be honest it is somthing rather recent that a lot of confernce recordngs started to pop up on youtube.
15:35:49krux02I really enjoy that.
15:36:05krux02maybe in the not too near future, there will be better indexing for such videos.
15:37:56krux02but hey, nobody is telling you, that you should watch those videos.
15:40:02*edcragg quit (Quit: ZNC - http://znc.in)
15:40:38*ofelas quit (Read error: Connection reset by peer)
15:40:54*edcragg joined #nim
15:42:48*ofelas joined #nim
15:48:47*Vladar joined #nim
15:48:48FromGitter<alehander42> no, now I want to build this video => textvideosegment app
15:48:55*Vladar left #nim (#nim)
15:48:57*Vladar joined #nim
15:49:38FromGitter<alehander42> :D but from what I've seen from youtube autocomments I don't have the tech for that
15:49:49FromGitter<alehander42> yeah, I am very happy for people who like them
15:49:55FromGitter<alehander42> just hard to understand them
15:50:31skelettWhy does `int(getTime)` fail on ARM?
15:51:04dom96how does it fail?
15:51:11dom96You sure it's only on ARM/
15:52:04skelettI'm currently debugging jester
15:52:22skelettthe application works on my system, but when I move it to my Raspberry, I get an compiler error
15:52:58skelettTelling me that it got `<Time>` but expected an `int`
15:53:12skelettand it's that instruction that creates the error
15:53:27FromGitter<GULPF> `int(getTime())` will no longer work, because `Time` is no longer `distinct int64`
15:54:05FromGitter<GULPF> toUnix(getTime()) should be used instead
15:54:41FromGitter<alehander42> yeah I used
15:54:44FromGitter<alehander42> toUinx today
15:54:51FromGitter<alehander42> for websocket.nim maybe I should PR
15:55:04dom96Might want to use the same version of Nim on your RPi and system :)
15:55:33FromDiscord<treeform> Any one seeing this error "lib/core/macros.nim(210, 81) Error: list of key:value pairs expected" when `import json` ?
15:56:13skelettInteresting ^^ Yeah I thought that I use the same version, but obviously not :D
15:56:23dom96I'm guessing you `git pull`'ed and your Nim compiler is now out of date
15:56:43*yglukhov joined #nim
15:57:09skelettyes. On the pi I pulled from git, and on my system, I'm using the AUR package.
15:57:47krux02well I wrote that line :D
15:58:05krux02well it is an issue I also discussed with Araq
15:58:34krux02the deprecation annotation is a new one
15:59:05krux02you should be able to just deleted the entire deprecation expression and build
15:59:16krux02and then bootstrapping should work
15:59:45krux02but you need a 0.18 compiler to compile the devel branch
16:00:26krux02so it should also work to checkout 0.18, build that and with that compile the devel branch
16:00:57*yglukhov quit (Ping timeout: 240 seconds)
16:04:23FromDiscord<treeform> dom96, yes rebootstrap worked
16:04:30FromDiscord<treeform> thanks!
16:04:40FromGitter<alehander42> @dom96 do you plan on supporting websockets.nim in jester somehow
16:05:39dom96Might write my own websocket implementation
16:05:53dom96or at least improve websockets.nim significantly
16:06:03FromGitter<alehander42> does it have perf problems
16:06:06dom96Specifically the API
16:06:20dom96not from what I've seen
16:06:20FromDiscord<treeform> I have written 90% of my own websocket implementation but then got lazy. I would feel more comfortable with yours.
16:06:24dom96but I never benchmarked it
16:06:41miranskelett: so you copy your source file(s) on RPi and compile it there? have you tried cross-compiling? (i would like to use nim with my RPi in the future, so i'm interesed in best/easiest way to do it)
16:08:08skelettNot yet. That would be the easiest way ofc, but I wanted to get this finished before playing around, as someone's waiting for me before he can continue.
16:10:10dom96btw if you want Jester and websockets you can already set it up fairly easily using nginx
16:10:21dom96Just run jester on a different port to websockets
16:12:41*girvo quit (Quit: Ping timeout (120 seconds))
16:12:55FromGitter<alehander42> nah, for now I just need it for a small prototype, it's like a chess multiplayer with weird versions of chess
16:13:06FromGitter<alehander42> I'll just keep everything in memory
16:13:09*girvo joined #nim
16:14:41FromGitter<alehander42> but sooner or later I'll try the combo yeah
16:15:18FromGitter<alehander42> I can also rewrite one football "beer bet" chat bot before the world cup in nim :D
16:16:27FromDiscord<claude> whats wrong with websocket.nim
16:18:20FromGitter<alehander42> @krux02 nobody got this one then :D
16:20:59FromDiscord<claude> thats easy, just add send for AsyncWebSocket in client
16:22:14FromDiscord<claude> oh
16:23:45FromDiscord<claude> i never looked at the server module
16:29:13miranre(gex) module worked differently in previous versions (ignoring whitspace, IIRC), is there a way to enable that old behaviour?
16:30:20miranoh, `rex` instead of `re`
16:33:07krux02any votes against this change in system.nim https://github.com/nim-lang/Nim/pull/7617?
16:34:54miranthumb up from me
16:45:17FromDiscord<treeform> I have updated my chrono library, https://github.com/treeform/chrono
16:45:22FromDiscord<treeform> Works in c as well as in javascript! All calendar manipulations! Include only the timezones and years you need!
16:49:39Yardanico@treeform - strings used to format and parse timestamps look very, very nice!
16:51:14FromGitter<alehander42> nice @treeform, I like when libs work on both backends!
16:52:37FromDiscord<treeform> Yardanico, thank you I wanted to do some thing different then DD-MM-YY or is it %D-%M-%Y or is it %d-%m-%y ... I wanted some thing more clear then the regex like things people normally do.
16:53:01FromDiscord<treeform> alehander42, JS backend is nice, works for the stuff I needed to work for.
16:54:21*SenasOzys quit (Ping timeout: 256 seconds)
16:54:34dom96treeform: Nice! The format strings are nice indeed.
16:54:36FromDiscord<treeform> `%D-%M-%Y` is acctually kind of ok, its the `%a-%p-%U` that is hard to read.
16:57:00*dom96 fixes zip's package structure
16:57:28FromDiscord<treeform> dom96, can you include the windows 64 bit dll that is need for it?
16:57:43FromDiscord<treeform> I got stuck with the zip packadge for like 2 hours and just gave up.
16:58:00dom96I don't use Windows so no
16:58:11FromDiscord<treeform> I think on windows you need to #define WINDOWS some thing and headers are different so its not ABI compatible with windows dll
16:58:16dom96Plus, commiting binaries is bad
16:59:02FromDiscord<treeform> I think the zip packadge is broken on win64 and I am not smart enought to figure it out and fix it.
17:00:41FromDiscord<treeform> I am not 100% sure but I think this structure: https://github.com/nim-lang/zip/blob/master/zip/libzip.nim#L67 on windows is different it uses 32 bit ints vs 64 bit ints or some thing like that.
17:01:07*xkapastel joined #nim
17:03:10FromDiscord<treeform> https://webcache.googleusercontent.com/search?q=cache:SmBdPQq-RQAJ:https://zlib.net/DLL_FAQ.txt+&cd=3&hl=en&ct=clnk&gl=us
17:11:24Araqso ... I have Ubuntu in a VM and cannot get gcc-3
17:11:39Araqany ideas?
17:11:59Araqthis is your time to pinch your favourite distro
17:12:05Araq*pitch ?
17:12:24FromDiscord<treeform> Mac OS X?
17:12:26Araqit needs to have gcc-3 so that I can test this thing
17:12:29krux02I have arch
17:12:43Araqosx maps gcc to clang afaik
17:12:47krux02but I would recommend Manjaro
17:12:56Yardanicokrux02, for a newcomer into arch world, yeah
17:12:56krux02but I have not checkout how to get gcc 4
17:13:01Yardanicobut maybe Antergos ;)
17:13:02krux02gcc 3
17:13:05krux02sorry typo
17:13:37krux02Manjaro is the advantages of Arch, but it actually very installable
17:13:45Yardanicothere's mipsel gcc 3 in AUR lol
17:14:34krux02this system already has Arch installed, so I would not switch, but if I would have to do a reinstall, Manjaro is my rocommendation. I used Ubuntu for years, but I had a lot of frustration that I could not get new software and system upgrades to a new release always broke stuff
17:14:53dom96Araq: Maybe there is a PPA that offer gcc 3?
17:15:08Yardanicothere is
17:15:26Araqdom96, yeah but my package manager says my system is bonkers anyway
17:15:40Araqand typing the random commands it tells me doesn't change things
17:15:56dom96so ask #ubuntu instead of spending days reinstalling and relearning a new distro
17:16:01YardanicoAraq, wait
17:16:09YardanicoAraq, there's gcc-3.3 in ubuntu
17:16:17krux02is the system just for developing and testing stuff?
17:16:28Araqkrux02, yeah.
17:16:42Yardanicobut it's source only
17:16:53krux02A good friend of mine uses nixOS, this is 100% declarative
17:17:11krux02meaning you can specify" I want this package this version, etc for this environment
17:17:12Yardanicokrux02, honestly I mostly use arch because of the wiki and AUR :)
17:17:23Araqthis is also 100% irrelevant. the only relevant thing is: can I install gcc-3 in one hour on it or not.
17:17:28krux02and you can switch and install arbitrary versions
17:17:31krux02without conflicts
17:17:55YardanicoAraq, http://old-releases.ubuntu.com/ubuntu/pool/universe/g/gcc-3.3/gcc-3.3_3.3.6-15ubuntu6_i386.deb
17:18:04Yardanicomaybe it can help
17:18:18dom96alternatively you can probably join the Docker hype
17:18:25dom96and grab a gcc-3 docker container
17:18:26Yardanicoand then "sudo dpkg -i file.deb"
17:18:45krux02I can't say anything else but from years of using ubuntu I have to say that it is a hacky horrible mess that is nice in the beginning, but after some time it really starts to smell.
17:18:46dom96You can probably do that on macOS in fact
17:18:54FromDiscord<treeform> 😃
17:18:59dom96krux02: isn't that all Linux? :P
17:19:17krux02dom96: no
17:19:35YardanicoI still didn't have any need to install ANY program without package manager
17:19:44YardanicoI always can find it in official repos or in aur :D
17:20:40krux02Yardanico, the good thing is that the package creation process is so simple that even if you only have a "make install" script, you can trivially transform it into a packa, automate it and put it up on AUR
17:20:53krux02and that is the reason that almost everything exists as an Arch package
17:21:22*SenasOzys joined #nim
17:22:11FromGitter<Varriount> Araq: I really like the additional information you added to the manual. :D
17:22:37Yardanicothere's even `aporia-git` in AUR!
17:23:10krux02everything is in AUR
17:23:38krux02a friend of mine made a zsh prompt, I made an AUR package for it
17:23:51*hal joined #nim
17:24:03krux02I have it installed as package, he has it installed on /usr/local/ unmanaged, because no pacaman.
17:24:10*hal is now known as Guest22644
17:24:45krux02but put that aside, I think manjaro is a great os when you want to have all recent software and a nice experience in general without much frustration.
17:25:28Yardanicokrux02, why not antergos? :)
17:25:38krux02und nixos should be an experimont, because it basically solves the problem that choosenim tries to solve for you for everything
17:25:55Yardanicokrux02, just look a this :D https://github.com/manjaro/packages-core/blob/master/manjaro-system/manjaro-update-system.sh
17:25:57krux02Yardanico: I have no opinion about antergos. I can't know every distro
17:27:32Yardanicoantergos is closer to arch, so it can't be installed offline (but it has full-blown gui installer)
17:27:37krux02it is just that practically I used Manjaro at work and the experience was really good and without the frustration I had when I installed Arch.
17:27:48AraqYardanico, the "Ubuntu Software" program hangs when opening this .deb file
17:28:00YardanicoAraq, try in console - `sudo dpkg -i file.deb`
17:28:44krux02I think all these different commands on ubutu very confusing "dpkg,apt-get,apt-chache,aptitude" I never know which one to choose
17:29:02Yardanicokrux02, you shouldn't use apt-get or apt-cache or aptitude
17:29:04Yardanicojust use `apt`
17:29:09krux02pacman unifies them all, very nice
17:29:18Araqkrux02, that's just the top of the iceberg
17:29:28Yardanicoapt combines different apt-* utilities
17:29:29krux02Araq: I know
17:29:30AraqYardanico, error processing dependencies
17:30:04YardanicoAraq, well... try `sudo apt install -f`
17:30:15AraqYardanico, did that
17:30:20Yardanicooh, IDK then
17:30:51AraqSub-process /usr/bin/dpkg returned an error code (1)
17:31:03FromDiscord<geckojsc> oh apt is the right one? I always used apt-get
17:31:57Yardanico@geckojsc yeah, it combines apt-get, apt-cache and more
17:34:27krux02I wish I could help with ubuntu, but your problems are the reasons I gave up on Ubuntu.
17:35:01Araqkrux02, oh you can be of help
17:35:57Araqhttps://github.com/nim-lang/Nim/issues/7301 fix this please
17:36:03Araqthat's what I'm trying to do...
17:36:37Araqyou need to patch lib/system/atomics to use the older __sync stuff from GCC
17:38:49Araqso ... time is up for my ubu session. it was a *much* worse experience than the one in 2010. we need to watch out these things don't happen to Nim.
17:40:40FromGitter<Varriount> Araq: So I think I've tracked down my problem with open arrays. This line - https://github.com/nim-lang/Nim/blob/devel/compiler/ccgcalls.nim#L100 - produces a check that errors when a string has a length of 0, and someone does `toOpenArray(emptyString, 0, -1)`
17:43:23FromGitter<Varriount> `if (0 >= emptyStringLen_0) #raiseIndexError();$n`
17:44:31FromGitter<Varriount> I'd fix it, only I can't think of an elegant way to handle the special case of getting a zero-length slice from a zero-length string.
17:45:44*yglukhov joined #nim
17:46:08krux02Araq: I can see that from AUR I can install the NIX package manager, maybe that allows me to create an environment where I have gcc3
17:46:13krux02as the default gcc
17:46:34Araqyou only need to install it somehow, it doesn't have to be the default
17:46:42Araqyou can change your nim.cfg to use it
17:47:21krux02nim.cfg always confused me
17:47:35krux02I looked at some and all I saw was linenoise
17:48:03krux02you recommended me several times to change stuff in there, but I never know how to do it
17:49:00krux02I think mipsel is the wrong package
17:50:10Guest22644dom96: Good evening. Sorry I was not able to look at the PR for the last days. I just pushed a commit that should make the tests pass again after the merge of the devel branch.
17:50:52Araqarm.linux.gcc.exe = "arm-linux-gnueabihf-gcc"
17:50:52Araqarm.linux.gcc.linkerexe = "arm-linux-gnueabihf-gcc"
17:51:06*Guest22644 is now known as hal1
17:51:39Araqand the stuff in the "quotes" is the binary it should use
17:51:57Araq# is a comment
17:52:07dom96hal1: Hrm, great. I think it was Araq that may have performed the conflict resolution incorrectly.
17:52:15dom96Nice that you've fixed it though
17:52:27dom96I already accepted it so it's in Araq's hands now
17:52:43hal1dom96: what I don't know is how to best add tests for the new procs
17:52:48Araqwell it was a -1 from me, dom96 and data-man gave a +1
17:52:56Araqand so it's accepted
17:53:34dom96Araq: Not necessarily, but you never explained why you gave a -1
17:54:04*couven92 quit (Quit: Client disconnecting)
17:54:17AraqI did. I consider it a niché case
17:54:26dom96hal1: maybe create a file in `getTempDir()`, set its mod time, then check that it was set correctly.
17:54:29krux02the oldest gcc I can find is gcc43
17:54:35krux02is that old enough?
17:54:38Araqand stdlib bloat is effecting every Nim user.
17:54:39dom96hal1: You should be able to find a good place for the test in tests/stdlib/
17:54:57Araqkrux02, check the bug report. maybe.
17:56:45hal1dom96: do the different smaller procs like toFILETIME in winlean and toWinTime in times need their own tests?
17:57:22hal1Maybe I should wait for a decision before I add to the PR?
17:57:30dom96hal1: Up to you, we don't usually go that crazy with tests.
17:57:53krux02Araq: I did a PR today, will you merge it?
18:00:06Araqkrux02, maybe I should give you write access
18:00:53Araq"This is not bad, but since rawExecute is already really long (!), it should be extracted into a helper proc."
18:01:12Araqhave you seen my remark?
18:02:16krux02oh no, I didn't. Thank you for pointing it out.
18:02:48krux02but I am not convinced that a helper proc would improve readability in any way.
18:03:10Araqyou even introduce 'let' bindings that would become parameters...
18:03:14krux02it would just add a layer of indirection to the code
18:03:38Araqin theory it is fine either way. in practice this thing exists in a context
18:03:49Araqand the context is a big hairy mess of control flow
18:04:06Araqso shorter code in control flow section is better code.
18:04:07*Lord_Nightmare quit (Excess Flood)
18:04:19Araqit's not about the code you added.
18:04:27Araqit's about all the other code around it.
18:05:23Araqshould probably have use a macro here...
18:05:47krux02yea, that is what I thought too when I first looked into that file
18:05:51*Lord_Nightmare joined #nim
18:06:18*nsf quit (Quit: WeeChat 2.0.1)
18:07:25krux02something like `proc eqIdent(a,b: NimNode): bool {.vmproc.} = a.node.ident.s ...
18:07:36Araqremember, when I wrote this code it was the new foundation for Nim's macro system
18:07:48krux02and then all the magics and opc values and the proc stup in macros get generated
18:08:06Araqcan't use macros to write a macro system.
18:08:08krux02yea you are right
18:08:15krux02well with bootstrapping you can
18:08:42krux02but I can't use the ast pattern matching macro to write ast pattern matching
18:08:46Araqtrue but I didn't trust the old VM.
18:08:58krux02now you do?
18:09:17AraqI know its edge cases and they are not hard to avoid
18:09:38Araqhave looked into producing errors instead of crashing. with mild success.
18:09:42krux02Well when I started I was a bit frustrated about some bugs in the vm
18:09:52krux02for example tables didn't work
18:10:00krux02but now I think the VM is ok
18:10:20Araq"ok" is the right word, still not "great", but "ok". :-)
18:10:43krux02I can use it to get stuff done
18:11:13krux02but I am still a bit confused at times where things are implemented.
18:11:50krux02there are so many different ways to write the implementation for the different ways nim compiles
18:12:35krux02the vm magics I now really understand and why they are like they are
18:12:58krux02but often I see some pragmas and I think, hmm, what does this mean?
18:16:14krux02Araq: when you give me write access to Nim, astmacros will become part of the standard library :P
18:16:50krux02I mean ast pattern matching
18:18:26Araqis that a threat or a promise?
18:19:52krux02I don't know
18:21:24Araqwell ast pattern matching is pretty important
18:22:14krux02that means I have a chance of ``of pattern(...) if a > b:`` to become valid syntax?
18:22:48krux02I don't need it to have any meaning in the Nim language, but it should be some ast
18:22:55krux02that is cool
18:23:39krux02the pattern that I use for matching look almost identical to the `astspec.txt`
18:23:48miranidiomatic way to convert a string to seq of chars?
18:24:23krux02miran: cast :P
18:24:51krux02let myseq: seq[char] = cast[seq[char]](mystring)
18:24:57krux02it works
18:25:41krux02but it is very unsafe, it could break in the future
18:26:07FromGitter<alehander42> please please if you add pattern matching to upstream Nim, make sure it's useful for all kinds of object , not just ast
18:26:44dom96miran: And why do you want to convert a string to seq of chars?
18:26:53krux02alehander42: I start with ast, and then I will introduce a way to make it more general
18:27:04krux02but I have to start with something
18:27:26mirandom96: so i can do `mySeq.map(parseInt)` :D
18:27:31FromGitter<alehander42> I am just not sure what is ast specific about it now
18:27:43dom96miran: :'(
18:27:49FromGitter<alehander42> what would stop me from using it with my own variant object
18:27:51dom96map should work on strings
18:27:55Araqyou know we just got for-loop macros
18:28:16dom96krux02: just because you have write access doesn't mean you can just add random stdlib modules :P
18:28:16Araqhere is a secret: that's a new language design pattern.
18:28:34krux02alehander42: well I don't know, maybe it will just work
18:28:37hal1I came across another thing I was not able to find in the standard lib: converting a relative path or just one containing .. to an absolute path. There is a posix and windows function for this though. Is a proc that does this something that could be added to ospaths (or the apropriate module) or would it fall in the stdlib bloat category?
18:28:50FromGitter<alehander42> i'll try to play with it actually, good idea
18:28:52Araqmacro patternMatch(obj: MyAst; body: CaseStmt)
18:28:58dom96hal1: pretty sure that exists, expandPath or something?
18:29:03Araqcase obj
18:29:07Araqof pattern: ...
18:29:22Araq# calls patterMatch(obj, <full-case-stmt>)
18:29:43krux02as long as you have a kind member, a `len` field and `[]` operator to access the children
18:29:53*PMunch joined #nim
18:30:19mirandom96: just tried `let b = "12343".map(parseInt)` and i get type mismatch
18:30:39Araqhal1, os.expandFilename
18:30:52dom96miran: By "should" I mean "it might not work now, but a PR should be created to make it work"
18:31:01krux02I also want to extract arbitrary values in single assignments
18:31:17mirandom96: ok, agreed on that 'should' :)
18:31:34dom96If you ever need to use seq[char] then you're doing something wrong
18:31:44krux02let pattern(`val1`, `val2`, ...) = something
18:31:47dom96I think I will make NimBot shout at people for writing seq[char] :P
18:31:50krux02and then val1 and val2 is declared
18:32:04krux02dom96: what is wrong with seq[char]?
18:32:33dom96It's a waste, there is no point to it
18:32:36dom96string is the same
18:32:42krux02seq[char] and string are technically equivalent, but semantically very different
18:32:51dom96converting back and forth just leads to inefficiency
18:32:55mirannah, seq[int] is what i need. seq[char] was a step in that direction, because `map` doesn't work on strings
18:33:00krux02seq[char] is just data and string is a string
18:33:15hal1Araq: Thanks! I missed that one
18:34:04FromGitter<alehander42> @Araq this might make sense, but on the other hand it would be so confusing if the same pattern acts differently for different variant types
18:34:57krux02dom96: you really should stop telling people to use string for data
18:34:58Araqalehander42: maybe.
18:35:13FromGitter<alehander42> Instead of this I think we should have "matchers" which can return something compatible with the standard matchers
18:35:26Araqkrux02, data would be seq[byte] though :P
18:35:27FromGitter<alehander42> and you can define your custom pattern , e.g. MyPattern(MyType)
18:35:36krux02Araq: yea, true
18:35:38FromGitter<alehander42> or [email protected](MyValue)
18:36:10dom96krux02: I stand by what I said, seq[char] is an anti-pattern :)
18:36:23FromGitter<alehander42> but standard match syntax should be always consistent, otherwise it will be like regexes with overloadable `*` :D
18:36:25Araqalehander42: well we'll see how for-loop macros are received
18:36:28krux02alehander42: just look at what works https://github.com/krux02/ast-pattern-matching
18:37:15AraqI probably got the design wrong but the implementation was really simple :-)
18:38:28Araqalehander42: the 'of' for custom macros are just a weirdo though
18:38:47Araqoverloading 'case' seem much more sexy and can simplify the grammar further.
18:38:50krux02Araq: a very useful weirdo
18:38:57krux02but it confuses my emacs a lot
18:39:07FromGitter<alehander42> @Arq ah, I was talking about patternMatch overloading
18:39:13krux02it really wants to fuck up indentation every time i use it
18:39:27FromGitter<alehander42> otherwise what is the goal of for loop macros, dealing with the lack of high level iterators?
18:39:29Araqkrux02, well it was invented for your purposes
18:39:34Araqno wonder you find it useful ;-)
18:40:02krux02alehander42: that is a solved problem, I know how ast pattern matching works in scala, it just needs to be implemented, and maybe a bit simplifiled, because nim doesn't require singletons
18:40:10Araqalehander42: in the very long run they make iterators obsolete if we do things right
18:41:13krux02Araq: I like the iterators nim has at the moment a lot
18:41:20krux02they are very easy to write and very flexible
18:41:48Araqiterator it ... would introduce hasNext() and next() operations and a for-loop macro would rewrite the for loop to use hasNext and next
18:42:04FromGitter<alehander42> @Araq overloading case yeah, I thoiught overloading of
18:42:05krux02jut some code that emits from time to time. I don't need to be "functional" and use flatmap an concat
18:42:34FromGitter<alehander42> but still, I wouldn't want somebody except the compiler to overload case
18:42:48FromGitter<alehander42> because I expect it to work the same for each *shape* (not just type)
18:43:00FromGitter<alehander42> e.g. for objects or seq-s
18:43:00krux02alehander: that is not a problem that is that local to solve
18:43:10mirannext() coming to iterators? woohoo!!
18:44:13krux02miran: I already implementad a macro so you could call next on iterators
18:44:33mirankrux02: but it is not in the stdlib, right? ;)
18:45:36Araqkrux02, inline iterators are not a first class thing and .closure iterators are more inefficient than they need to be
18:46:30krux02Araq: the real problem I have with the two different iterators is that it is an either or thing.
18:46:56Araqinline iterators are cool for v1, closure iterators are an accident
18:47:00krux02either it is an inline iterator or a closure iterator. AFAIK You can't write an iterator that works in both words
18:47:02*couven92 joined #nim
18:47:28Araqand then there is this weird overloading thing
18:47:42Araqwhere in a type() operator we prefer iterators over procs
18:47:57dom96I feel like I need context here
18:48:05Araqand iter.toSeq() cannot work because 'iter' is not a "routine"
18:48:06dom96AST pattern matching? For loop macros?
18:48:12Araqetc etc.
18:48:37dom96Maybe we should start by adding some nice AST accessors?
18:48:42Araqso yeah, eventually we will have something better
18:48:47dom96so that we can stop writing [0][2][1][2] everywhere
18:48:56dom96(in macro code)
18:49:12Araqdom96, krux02 has the more general solution
18:49:14*nsf joined #nim
18:49:26krux02Araq: I think it would be fun to have "collect: yield 1; yield 2; ..." and this is then an expression of seq[int]. But a macro should be able to do it.
18:49:54*sz0 joined #nim
18:50:51krux02Araq: there is one thing that I also don't like about iterators, and that is how it extracts tuples.
18:50:57FromGitter<alehander42> @dom96 ast pattern matching is just the first usecase, it's supposed to be general
18:52:07Araqkrux02, that one I do like.
18:52:32krux02I think ``for i, x in something`` should explicitly ask for an iterator with keys, and ``for (i, x) in something`` should explicitly ask for the normal items iterator, that returns pairs.
18:52:39dom96whatever you guys are creating, please do it as a nimble package first
18:54:11miranofftopic: i have a proc with `s: var string`, and i want to call it recursively with a slice of that string (`myProc(s[1 .. 5]`), but it is a type mismatch
18:54:51krux02and ``for i, (x1, x2, x3) in zip(s1, s2, s3)`` should append an index, even when zip doesn't provide one.
18:55:14krux02miran: that is not offtopic, this is still the nim channel
18:55:34mirankrux02: offtopic when the topic are iterators :)
18:55:44krux02the topic is Nim
18:55:54krux02the current subject is iterators
18:55:57krux02or better was
18:56:02krux02I said what I wanted to say
18:57:11krux02but I don't know anything about your problem
18:58:42krux02miran: var tmp: string = s[1..5]; myProc(tmp)
18:58:53krux02be aware, slicing copies
18:59:17miranoh, if it is a copy, it won't be of much use....
18:59:25mirani'm figuring out the other way
18:59:38Araqit's also not an lvalue
18:59:41*Lord_Nightmare quit (Ping timeout: 265 seconds)
18:59:48Araqand so cannot be passed to a 'var T'
18:59:50krux02if you want to pass a slice of a string, pass the slice and the string
19:00:01krux02myProc(s, 1..5)
19:00:03Araqor use openArray and toOpenArray ;-)
19:00:13Araqwhich is the new zero copy slicing
19:00:42krux02Araq: does openArray work to get any subslice of a string?
19:00:49krux02without copying
19:01:13Araqwell variount found a bug, but sure.
19:01:23krux02then how is the syntax
19:01:45Araqfoo(toOpenArray("abc", start, end))
19:01:56Araqyeah, I know the syntax still sucks
19:02:24Araqwill eventually optimize x[a..b] to toOpenarray()
19:02:28krux02well it would help if I can use the ..< operator like I am used ot
19:02:51krux02foo(toOpenArray("abc", 0 ..< i))
19:03:53dom96openarray becomes ever more confusing for newbies
19:03:56krux02Araq: gcc is still building
19:04:06dom96now we're abusing it for slices too? :)
19:04:26krux02well isn't that what they are supposed to be?
19:04:47*Lord_Nightmare joined #nim
19:11:44Araqdom96, openArray is (ptr to array, length) pair in contexts where we can assure memory safety
19:11:57Araqas such it's the natural candidate for giving us zero-copy slices
19:12:15dom96great, so perhaps it shouldn't be named openarray anymore?
19:12:32Araqand it's still a (ptr, length) pair so I don't see how it becomes "ever more confusing" :-)
19:12:49krux02dom96: I would call it slice, but that name is taken
19:12:49Araqdom96, if you know a better name
19:13:33dom96I was going to say 'slice' :)
19:14:10dom96Maybe openSlice?
19:15:07krux02openarray is fine
19:15:59dom96FWIW I never thought of `openarray` as a `slice`
19:16:17dom96It was always a magical type that means `seq[T] | array[T] {.unchecked.}` to me
19:16:18miranmultifunctionalArray :P
19:17:25krux02I mean you could also add "stride" to the openarry, so you can get an openarray[int] from seq[tuple[a: string, b:int, c: float]
19:20:14Araqso ... can we extract io.nim from system.nim, never mind, canon, I remembered
19:23:07FromDiscord<claude> could the playground code be -d:release'd?
19:23:16FromDiscord<claude> <https://play.nim-lang.org/src/nimcache/app.js>
19:23:51dom96Is it slow?
19:24:29FromDiscord<claude> i was just looking at it and it seemed cluttered
19:24:38Yardanicoclaude: are you sure it's with -d:release?
19:25:16Yardanicoit looks fine to me
19:26:24Yardanicohmm, wait, yeah
19:26:49Yardanico@claude you're actually right
19:26:58Yardanicovar F={procname:"system.reprEnum",prev:framePtr,filename:"lib/system/reprjs.nim",line:0};
19:27:31dom96I never bothered to -d:release my snake game either
19:27:34dom96Also wow, 0.16.1
19:28:17Yardanicodom96, yeah, V8 is probably good at optimizing JS anyway
19:28:28FromDiscord<claude> im on firefox
19:28:29Yardanicobut if you want best results, you should do -d:release and then run closure compiler on your JS
19:28:41Yardanico@claude: nim playground wasn't slow for me on firefox
19:28:48FromGitter<data-man> @claude: https://github.com/zacharycarter/nim-playground/issues/3
19:28:49dom96Yeah. Don't assume V8 :)
19:29:11dom96data-man: That's a different issue
19:29:30FromGitter<data-man> No :)
19:33:18FromGitter<alehander42> oh I really have to optimize my checkmate detection
19:33:38FromGitter<alehander42> but still having the same validation in Nim be used in js browser and native server is amazing
19:34:13Yardanico@data-man: https://github.com/zacharycarter/nim-playground/issues/3
19:34:26FromGitter<alehander42> this ability to reuse code have to be marketed in the nim web frameworks, currently mostly js and clojure people have it
19:34:29Yardanicoalso, why don't you use IRC? :) it would be easier to tab your nickname :)
19:35:33AraqYardanico: you promised to remove deprecated stuff. now is the time, I think.
19:36:15dom96alehander42: That's what I tried to do via the snake game
19:36:20dom96It really is amazing
19:36:38YardanicoAraq, old deprecated stuff?
19:36:52Araqthat's the original idea behind the JS codegen.
19:37:40Yardanicolike stuff that was deprecated 6 months ago or older?
19:38:03AraqYardanico: stuff deprecated in 0.16 or lower
19:38:04dom96Stuff that was deprecated pre-0.18.0 (or maybe 0.17.2)
19:38:15dom96Araq is more conservative here
19:38:25YardanicoAraq, ok
19:38:47Yardanicoso 0.16 was released in january of 2017, ok
19:38:52*hal1 quit (Quit: WeeChat 1.4)
19:40:17dom96Most deprecations should mention the version
19:40:29dom96so you won't need to run `blame` much
19:41:23Yardanicodom96, I have an extension in vscode which provides info when specific line was changed
19:41:29Yardanico(for git repos)
19:41:43AraqYardanico: what is its name?
19:42:51YardanicoAraq, GitLens
19:43:23FromGitter<data-man> https://github.com/nim-lang/website/issues/80 :-D
19:43:46Yardanicothere's also much more features in that extension besides blame-like functionality of course
19:44:21Yardanico@data-man: lol
19:44:52FromGitter<data-man> Good idea!
19:45:35FromGitter<data-man> And other langs too.
19:45:47*rokups quit (Quit: Connection closed for inactivity)
19:59:03krux02obviously just russion is important
20:02:14Yardanicokrux02, russion? :D
20:02:39Yardanicobut yeah, we can easily add russian/german/*insert your native language*
20:02:45krux02well that is the issue.
20:02:53FromGitter<data-man> russioff :)
20:03:08FromDiscord<claude> most people who use nim are european anyway
20:03:22krux02it's not, please add support for other languages on the website for example russian, it is "Please add russin!"
20:03:59*Trustable joined #nim
20:05:17Yardanicoclaude: hmmm, this is probably true
20:06:41*Trustable quit (Remote host closed the connection)
20:08:19FromGitter<data-man> And multilingual docs & forum - just dreams
20:10:35Yardanicoit is
20:10:54Yardanico*they are. I mean almost no language has multilingual docs :)
20:14:45*Lord_Nightmare quit (Ping timeout: 264 seconds)
20:15:07*Vladar quit (Quit: Leaving)
20:19:21*Lord_Nightmare joined #nim
20:20:51miranis array of bools any faster than array of ints (containing just 0 and 1)?
20:21:26miranfaster and/or less memory?
20:21:46Yardanicomiran, most probably less memory, can't tell about speed
20:21:50krux02bool is one byte, int is 8 byte
20:22:10skelettIf it's according to c, then ints are per definition the fastest types
20:22:11FromGitter<tim-st> Do other programming languages also save the object field names as strings inside the generated binary file?
20:22:15skelettdon't know about nim though
20:23:16krux02tim-st that is called reflection, and Go and Java does it
20:23:32krux02runtime reflection
20:23:43miranargh, in nim there's no implicit true=1 and false=0 :(
20:23:59krux02miran: you can write a converter proc
20:24:07Yardanicokrux02, wouldn't const do it?
20:24:11krux02``converter toBool(arg: int): bool = arg != 0
20:24:16krux02and you are good
20:24:17FromGitter<tim-st> yes, I know what reflection is, but if I dont use it isnt that bad regarding peformance?
20:25:14krux02well maybe there is a compiler flag to disable it
20:25:48Yardanicokrux02, miran probably talks about const true = 1; const false = 0?
20:25:56Yardanicoor IDK
20:26:05Yardanicoah, sorry, misunderstood his question, you're right
20:26:07FromGitter<tim-st> @ krux02 ok, thanks
20:27:03Yardanico@tim-st: does nim do that?
20:27:11miranjust converted to array of bools - slightly faster (0.5 vs 0.6 sec), noticeably less memory (1.1 Mb vs 1.8 Mb)
20:27:31krux02I don't know about runtime reflection in Nim
20:27:37FromGitter<tim-st> @Yardanico yes, I compiled in release version and it does
20:27:46Yardanicoah, you mean things like "TM_hNO9c5XDtIbe4m20FGQ9bN2Q_0[34].name = "ids";"
20:29:57FromGitter<tim-st> But why is this inside my binary if never want this to be shown? Someone can sees many of the program logic on the first look using debugger only through strings
20:31:53krux02tim-st: check in the compiler options list
20:31:59krux02I haven't checkit that
20:32:06krux02but maybe you can disable it
20:32:06FromGitter<tim-st> ok, I will try it
20:32:11Araqyeah, need to fix that
20:33:19YardanicoAraq, it can be fixed?
20:33:50FromGitter<tim-st> I think the idea is to print some information about variables on exception
20:34:09Araqit's old-school RTTI
20:34:14Araqmarshal.nim uses it
20:34:26Araqotherwise it would be dead simple to avoid it
20:34:46krux02couldn't marshal use macros instead?
20:35:24Araqyeah well, legacy
20:37:49Araqalso repr uses it...
20:38:33FromGitter<tim-st> My file is quite small my only idea is that variant object uses it
20:38:47PMunchDoes anyone know the name of the font used in the Nim logo?
20:42:20*miran quit (Quit: Konversation terminated!)
20:43:43FromGitter<mratsim> @miran converters are a trap
20:44:12Araqin what sense?
20:44:17FromGitter<mratsim> Also: what is fastest depends on word size and cache.
20:44:41FromGitter<mratsim> sometimes converters pull the flying carpet under you and you fall flat on your face :P
20:48:00PMunchIs it even a font? Or was it just drawn for just the Nim logo?
20:48:03FromGitter<mratsim> Also regarding iterators, I like the current yield design. I do use “next” iterators for Arraymancer though.
20:49:26*sz0 quit (Quit: Connection closed for inactivity)
20:51:54dom96PMunch: IIRC it's not a font
20:52:23Araqit's NimFont
20:54:31PMunchAh, so it's only those three letters?
20:54:35PMunchNot a full font?
20:55:19krux02installing gcc4 failed :/
20:55:36AraqPMunch: yeah.
20:56:44Araqkrux02: why?
20:56:54dom96PMunch: Indeed.
20:57:19PMunchHmm, maybe I should try to make a font :P
20:57:40dom96But why?
20:58:00PMunchI'm making a presentation on Nim, and wanted to use the same font for the headers to keep it looking like a cohesive theme :)
20:58:44dom96You can probably find a similar font
20:58:50dom96but reusing this everywhere will look odd IMO
21:00:13Araqno, let him create NimFont
21:00:40krux02what will nimfont be?
21:00:55Araqwill use it in NimEdit
21:01:06Araqrunning on NimOS.
21:01:13krux02a specific font for the nim programming language? a font for the website? or a font rendering engine in nim
21:01:33Araqrunning on my NimCPU that I designed with Nim
21:01:44krux02when will Nim 2 be a thing
21:01:49krux02Nim 2, Programmieren ind
21:01:59krux02Nim 2, Programmieren und Naschen
21:02:13PMunchdom96, it would only be used for headers
21:03:43dom96PMunch: What are you using for your slides?
21:03:50krux02for those who don't get the context: https://www.youtube.com/watch?v=gowiGoHooFQ
21:06:15PMunchdom96, to create them?
21:06:38FromDiscord<claude> i thought you said "designed with my Nim"
21:06:48*nsf quit (Quit: WeeChat 2.0.1)
21:09:00FromGitter<alehander42> i am scared of this
21:15:57FromGitter<diegogub> haha gues, quick question..how do I solve this: Error: The .nimble-link file is pointing to a missing file: /Users/diegogub/Projects/nim/evento_cli/evento_cli.nimble ?
21:24:43dom96rm -r ~/.nimble/pkgs/evento_cli-#head
21:25:48FromGitter<diegogub> @dom96 thank you!
21:29:14FromDiscord<treeform> krux02, my font rendering engine in nim is almost done.
21:29:36krux02what types of fonts can it load, render?
21:29:43krux02and how does it render fon?
21:29:48FromDiscord<treeform> svg, ttf and otf.
21:30:27krux02svg is a font?
21:31:03krux02for games, font rendering should be done into an array of bytes
21:31:20krux02so rasterization
21:31:49FromDiscord<treeform> Some comparisons between font renderers:
21:31:51FromDiscord<treeform> https://cdn.discordapp.com/attachments/371759389889003532/435190543572664320/unknown.png
21:32:04FromDiscord<treeform> typorgraphy renderer, 1st one is mine
21:32:46FromDiscord<treeform> krux02, svg fonts are the best fonts, very easy to parse and read and reason about.
21:32:48federico3there is os.isHidden but no portable way to create hidden files, right? https://nim-lang.org/docs/os.html#isHidden,string
21:33:01krux02the clear type looks like it has sub pixel anti aliasing
21:33:41krux02federico3: on unix like systems, hidden files are just files with a name that starts with a '.'
21:33:47FromDiscord<treeform> The ttf and otf sux as file format 20 years of baggage. File format feels like they did not know you can just use zlib, so they made their own stupid compression method.
21:33:50krux02I think that is very ugly.
21:34:17FromDiscord<treeform> My thoughts on subpixeling:
21:34:19FromDiscord<treeform> https://cdn.discordapp.com/attachments/371759389889003532/435191164401090561/unknown.png
21:34:50federico3krux02: I'm not sure how that answers my question
21:35:09*jaco60 quit (Quit: Textual IRC Client: www.textualapp.com)
21:36:31krux02federico3: add a dot in front of the file, and it is hidden
21:36:42krux02(on unix systems)
21:36:53federico3I know that but I'm asking about a portable solution
21:36:55krux02in other words there is no porable way to do that
21:37:26krux02and hidden files in general are dirty
21:37:37krux02make a visible folder for all your files
21:37:45krux02put the stuff in there, visible
21:37:55krux02but don't create invisible files
21:38:09krux02I don't want invisible files on my system
21:38:28krux02I can't get rid of them, but I can at least advertise to people to to make more of them
21:38:54FromDiscord<treeform> krux02, for games you can render fonts in to ways to pixel buffer, or to a texture atlas, then you draw quads with the atlas. I want to support both methods. Right now only pixel buffer is supported.
21:39:39FromDiscord<treeform> krux02, svg fonts are really nice and simple: https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/SVG_fonts
21:42:10krux02treeform: for the font atlas, all I would like is for each character a region into that atlas, then I can render it.
21:42:27krux02so you don't need to provide any rendering, just provide an atlas and a mapping
21:42:42krux02then I can do do the rendering on my own
21:42:57*couven92 quit (Quit: Client Disconnecting)
21:43:43*PMunch quit (Quit: leaving)
21:44:00FromDiscord<treeform> yeah the contract there becomes a bit blurred.
21:44:13krux02but it should be a texture atlas in just like "here is an array of pixels, with this stride and this size"
21:44:26FromDiscord<treeform> Then the typesetting becomes hard as you need to know by how far to move letters and when they wrap.
21:44:52FromGitter<Varriount> @zacharycarter Are you around?
21:45:24krux02well yea, it is a simple way to render fonts, but it can be rendered very fast
21:45:38krux02it would not support ligatures or something like that
21:46:03FromDiscord<treeform> krux02, also there are so many letters in Chinese you might want to generate the atlas at run time.
21:46:29krux02yes I want to generate it at runtime
21:46:46krux02I did not say anything about offline
21:46:55FromDiscord<treeform> krux02, also fonts bello < 20px need subpixeled positions to look great.
21:47:04FromDiscord<treeform> so you need like 10 images per letter
21:47:15FromDiscord<treeform> well that is what I plan on doing
21:47:35krux02treeform: well I like pixel fonts with fixed size :P
21:47:49FromDiscord<treeform> ah then all that pretty much does not matter
21:48:12krux02but subpixel precision is not really a problem at all, when you specify offsets, just make them non-integers
21:48:38FromDiscord<treeform> it does matter if you cache the glyphs (which you should do)
21:48:43krux02normal texture coordinates are in the range [0,1]
21:49:56krux02so subpixel coordinates and sizes should not be a problem
21:51:32krux02but why 10 images per letter?
21:52:19FromDiscord<Generic> is there a way to prevent a template with no parameters from evaluating, when passing them to a macro, without changing the parameter type to untyped?
21:52:30FromGitter<data-man> @miran: Try bitsets from the compiler dir.
21:53:10FromDiscord<treeform> krux02, for me it was just easy to do 0.0, 0.1, 0.2 ... 0.9, 1.0 shifted versions of glyphs.
21:53:39krux02ah I get it
21:54:13FromDiscord<treeform> I will add an example of subpixel shifted glyphs and without.
21:54:25krux02but my binary obsission would prefer 0.125 0.25 0.375 etc :D
21:54:26FromDiscord<treeform> to the docs, it looks like i have broken it.
21:55:10krux02but I think it wouldn't make a difference
21:55:20FromDiscord<treeform> I think the number of subpixel glyphs should be a setting, its a quality vs memory tradeoff.
21:55:45krux02that would be cool
21:57:05krux02it is just very important that i can map a string to a seq of positions and render it in one draw call
21:57:11krux02then it's fast
22:04:21FromDiscord<treeform> I hope the system would be fast enough and flexible enough for you to use in the way you want.
22:13:08Araqtreeform: nimx or one of its dependencies has a subpixel font rendering engine
22:13:35Araqwhich yglukhov claims to be better than the stuff OSX uses iirc.
22:14:18Araqmaybe extract his code and clean it up, maybe look at it for inspiration. the Nim community needs to work together better IMO.
22:16:31FromDiscord<claude> you mean like how theres too many different libraries for the same thing?
22:21:35Araqno I mean many start with their own thing unaware of what already exists
22:22:03FromGitter<data-man> https://github.com/memononen/nanovg - small antialiased vector graphics rendering library for OpenGL. Can to use FreeType for font rendering.
22:23:47FromDiscord<treeform> Araq, nimix uses stb_ttf which is fine.
22:23:56FromDiscord<treeform> its a C lib I did look at.
22:24:34FromDiscord<treeform> I really want to understand deeply how fonts work.
22:24:37Araqhuh? I don't think nimx uses stb_ttf
22:24:49FromDiscord<treeform> https://github.com/yglukhov/nimx/blob/master/nimx/font.nim#L10
22:25:41FromDiscord<treeform> It does DistanceField field stuff on top of that which is cool.
22:27:41FromDiscord<treeform> maybe he would be able to replace stb code with my code eventually
22:28:50*SitiSchu joined #nim
22:28:55*SitiSchu quit (Remote host closed the connection)
22:29:25Araqhttps://github.com/yglukhov/nimx/blob/master/nimx/private/text_drawing.nim ?
22:29:28*SitiSchu joined #nim
22:29:57FromDiscord<treeform> Yes this is distance field related stuff.
22:30:06FromDiscord<treeform> He still needs to get the shapes from some place
22:30:14FromDiscord<treeform> he gets them from stb_ttf
22:30:53Araqhmmm maybe.
22:31:04krux02the distance field stuff is really just for foonts you want to zoom in dynamically
22:31:15krux02or look at from different directions
22:31:20FromDiscord<treeform> Distance fields are great for drawing text in 3d, probably also work great in 2d, but to me it feels like a bit of an overkill?
22:31:38krux02but as long as it's for 2D ui it really is not the way to go
22:32:14FromDiscord<treeform> Android I think uses distance fields for 2d, so I would not reject it out right.
22:32:33FromDiscord<treeform> original distance fields paper: http://www.valvesoftware.com/publications/2007/SIGGRAPH2007_AlphaTestedMagnification.pdf
22:32:47krux02I once tried to implement the distance field. it is not that clean as it sounds
22:33:20FromDiscord<treeform> https://medium.com/@romainguy/androids-font-renderer-c368bbde87d9
22:33:47FromDiscord<treeform> No it does not use it, "I’ve also looked into signed distance fields but"...
22:33:52FromDiscord<treeform> I was wrong it does not use it.
22:34:16FromDiscord<treeform> Then no one from the big companies use distance fields for 2d text.
22:35:01dom96Attempting to use nimCEF, and my first thought is to write my own wrapper :(
22:35:06krux02yea I even think it's not the best result for 2d text
22:35:28FromDiscord<treeform> My goal is the finish this "reference" implementation that is simple and work on CPU. Then when I work on optimizing it with different approaches or not if its fast enough.
22:35:28FromDiscord<claude> is playground not working for anyone else
22:35:53FromDiscord<treeform> krux02, you might be right. I don't know if its good or bad, just feels like an overkill.
22:36:05dom96claude: yep, looks like it's down.
22:36:16dom96@zacharycarter ^
22:36:57FromDiscord<treeform> I have a bug in the OTF renderer:
22:36:58FromDiscord<treeform> https://cdn.discordapp.com/attachments/371759389889003532/435206930479317002/unknown.png
22:37:02krux02I know what it is good for, but your subpixel approach seems much better suitable
22:37:06FromDiscord<treeform> Its hard to find bugs like this, it could be anything!
22:37:46krux02and with the distance field, you would need much bigger texture atlas that you would like to render in.
22:38:10FromDiscord<treeform> krux02, yes there are other approaches too.
22:38:36FromDiscord<treeform> this guy is amazing: http://wdobbie.com/post/gpu-text-rendering-with-vector-textures/
22:38:55FromDiscord<treeform> warning huge webGL demo: http://wdobbie.com/pdf/
22:44:59*xet7 quit (Ping timeout: 276 seconds)
22:46:51krux02yea it's interesting. But I don't want to spend too much time on text rendering
22:46:58krux02I want a solution that works simply.
22:47:48krux02and is fast
22:49:42krux02I want to stop worrying. That is the most important
22:49:57FromGitter<data-man> https://github.com/jangko/nimAGG - Nim port of Anti Grain Geometry
22:51:11FromDiscord<treeform> how does this compare to cairo?
22:51:16krux02I have my own rendering engine
22:51:57krux02this is for real time graphcis and cairo is for offline image transformations (AFAIK)
23:01:21FromDiscord<treeform> I got cairo going at 144fps to almost a 4K texture. Its not the best method but it works?
23:03:44krux02treeform: I just looked up cairo, and it seems it supports an experimental opengl backend.
23:03:59krux02but the focus for cairo seems clearly quality over performance
23:04:15krux02meaning it is probably not the right tool, when you want to render complex scenes
23:05:52krux02but the way the api looks like, seems to be that it is impossible to be very performant
23:06:26krux02but that is just a rough quick quess
23:06:31FromDiscord<treeform> For the things I want to draw even javascript works...
23:07:12FromDiscord<treeform> this is my game: http://store.steampowered.com/app/449140/Istrolid/
23:08:09krux02and you did that with cairo?
23:09:25krux02it reminds be of a flash game that I once played, where you could attach parts from enemies that you killed
23:09:25FromDiscord<treeform> nope, HTML+webGL
23:09:52FromDiscord<treeform> flash game probably was http://www.captainforever.com/captainforever.php
23:10:16krux02yes exactly that game
23:10:35FromDiscord<treeform> mine is an RTS game though
23:10:38FromDiscord<claude> youre making a game in nim?
23:10:43FromDiscord<treeform> yes I am
23:10:45FromGitter<alehander42> I argued for an hour with a guy who defined programming languages as "something that can be represented as AST which can be described by formal rules"
23:10:53FromDiscord<treeform> as well as other non game things
23:10:57FromGitter<alehander42> am I drunk, or this is just a horrid definition
23:12:17FromDiscord<treeform> I think Wikipedia defines it well.
23:12:37FromDiscord<treeform> "Source code of a simple computer program written in the C programming language, which will output the "Hello, world!" message when compiled and run.
23:12:37FromDiscord<treeform> A programming language is a formal language that specifies a set of instructions that can be used to produce various kinds of output."
23:12:53FromDiscord<treeform> "A programming language is a formal language that specifies a set of instructions that can be used to produce various kinds of output."
23:12:55krux02well that is weird
23:13:08FromDiscord<treeform> oops grabbed the image
23:13:41krux02treeform: well it is a bit more complicated than that.
23:13:52krux02it completely ignores the compilation part
23:14:08FromDiscord<treeform> many languages don't compile?
23:14:17FromGitter<alehander42> the problem with his definition is, you can describe everything that way, I can represent a text file as an AST with PARENT => all chars and rules "you just show each letter on the screen"
23:14:18FromDiscord<treeform> some are even graphical
23:14:43krux02well you can also say, everything is a graph
23:14:44FromGitter<alehander42> yeah, compilation is an impl detail
23:14:58FromGitter<alehander42> well, that would be a more valid sentence :D
23:15:00krux02and you would be correct about it, but it is also not very helpful either
23:15:27FromGitter<alehander42> ok, but for real you can say that emails or phone numbers or music sheets are programming langs
23:15:31FromGitter<alehander42> with that definition
23:15:35FromGitter<alehander42> (I think)
23:15:48FromGitter<alehander42> with the "ast + formal rules" def
23:15:53krux02alehander42: I don't think that compilation is an impl detail. It is often the essential component that decides if the language can be used for the task, or not.
23:15:57*noonien quit (Quit: Connection closed for inactivity)
23:15:58FromGitter<alehander42> the wiki one seems more blurry, but nice
23:16:09FromGitter<alehander42> no no, the question is "definition of a programming language"
23:17:13krux02I would say a programming language is a language that can be translated (compiled) into a set of instructions for a computer to do a certain task.
23:17:26FromGitter<alehander42> it can be interpreted
23:17:36FromGitter<alehander42> it can exist in an universe where there are no computers
23:17:39krux02and interpreters are just an on-the-fly way of doing this translation
23:17:49FromGitter<alehander42> and you interpret it with your daily routine
23:18:43FromGitter<alehander42> I was more looking for something that describes the notion of "notation" + "rules to interpret/run this notation" + "programmability, not just reproduction of input"
23:20:42krux02does this matter?
23:21:59krux02well a programming language is something that can accurately implement the turing machine.
23:22:20krux02or λ-calculus if you prefer that
23:23:37krux02you need to be sure to exclude "html" from programming language.
23:28:59*arecaceae quit (Remote host closed the connection)
23:29:23*arecaceae joined #nim
23:38:38FromDiscord<claude> is there a pragma like `unusable` to disable unused warnings for just 1 declaration?
23:39:22krux02well I don't know how to use it, but there is some push and pop pragams and then you can disable warnings
23:39:38FromDiscord<claude> they wouldnt work for my case
23:39:51krux02it is used in the sourcecode of nim itself a lot, but you have to look it up how it is used
23:40:35krux02well you can export the declaration, then the unused warning goes away
23:40:43krux02but I think that is not what you want to do
23:44:13FromDiscord<claude> this is what my use case looks like <https://gist.github.com/hlaaftana/f253178044636b11fdd374ec08a15b45>
23:44:44FromDiscord<claude> it's fine if `arg` is unused, but if i comment out the push/pop pragmas it says invalid pragma
23:47:17FromDiscord<claude> oh wait its hint not warning
23:48:22FromDiscord<claude> now its a valid pragma but still gives the unused warning even if i put the pop after the body