00:04:51 | * | arnetheduck joined #nim |
00:10:50 | def-pri-pub | If anyone here understands how async stuff works in Nim a bit better, I could use a little help with this: |
00:10:53 | def-pri-pub | https://forum.nim-lang.org/t/3146/1#19890 |
00:26:41 | * | def-pri-pub quit (Ping timeout: 248 seconds) |
00:30:41 | * | Matthias247 quit (Read error: Connection reset by peer) |
00:31:29 | * | arnetheduck quit (Ping timeout: 248 seconds) |
00:48:01 | * | onionhammer quit (Ping timeout: 248 seconds) |
01:00:57 | * | def-pri-pub joined #nim |
01:04:17 | skrylar | eh well, time to pack it up for github and nimble |
01:04:30 | skrylar | does the round trip to object/string/epochtime |
01:25:01 | * | def-pri-pub quit (Quit: Lost terminal) |
01:34:09 | * | yglukhov joined #nim |
01:38:39 | * | yglukhov quit (Ping timeout: 248 seconds) |
01:39:11 | * | Kingsquee joined #nim |
01:41:21 | * | chemist69 quit (Ping timeout: 252 seconds) |
01:48:25 | * | onionhammer joined #nim |
01:51:06 | * | def-pri-pub joined #nim |
01:54:50 | * | chemist69 joined #nim |
02:01:44 | * | ipjk_ joined #nim |
02:05:00 | * | ipjk quit (Ping timeout: 252 seconds) |
02:49:56 | * | skrylar quit (Remote host closed the connection) |
02:54:44 | * | pilne quit (Quit: Quitting!) |
02:57:04 | * | dddddd quit (Remote host closed the connection) |
03:37:30 | * | def-pri-pub quit (Quit: leaving) |
03:39:23 | * | shashlick joined #nim |
04:12:26 | * | BigEpsilon joined #nim |
04:22:25 | * | rauss joined #nim |
04:42:13 | FromGitter | <Grabli66> Hi! Is it possible to set big-endian or little-endian for stream? |
04:57:58 | * | miran joined #nim |
05:08:13 | * | gokr joined #nim |
05:13:02 | * | Snircle quit (Ping timeout: 246 seconds) |
05:27:59 | * | shashlick quit (Quit: Leaving) |
05:30:00 | * | Snircle joined #nim |
05:31:17 | * | miran quit (Ping timeout: 260 seconds) |
05:41:21 | * | Kingsquee quit (Ping timeout: 240 seconds) |
05:43:37 | * | miran joined #nim |
05:55:35 | * | gokr quit (Ping timeout: 240 seconds) |
05:55:57 | * | BigEpsilon quit (Remote host closed the connection) |
05:56:03 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
05:56:09 | * | BigEpsilon joined #nim |
06:16:05 | * | miran quit (Ping timeout: 240 seconds) |
06:24:16 | * | Vladar joined #nim |
06:27:49 | * | nsf joined #nim |
06:32:03 | * | rauss quit (Quit: WeeChat 1.9) |
06:33:00 | * | rauss joined #nim |
06:37:53 | * | mahmudov quit (Remote host closed the connection) |
06:43:39 | livcd | i almost bought the nim book yesterday since it was on 50% discount |
06:44:30 | Araq | I almost like that |
06:45:38 | livcd | well I really wanted but the price is still steep for me especially when I do not really have a need for it |
06:45:45 | livcd | maybe on christmas :-) |
06:50:41 | Araq | no worries |
06:54:37 | FromGitter | <Grabli66> Is it possible to set big-endian or little-endian for stream? |
06:55:21 | Araq | no, you can use endians.nim to swap byte order though |
06:55:44 | FromGitter | <Grabli66> Ok. |
06:56:58 | FromGitter | <Grabli66> And why stream has readInt8, readInt16, etc, but does not have writeInt8, writeInt16, etc? |
06:57:15 | * | Arrrr joined #nim |
06:57:15 | * | Arrrr quit (Changing host) |
06:57:15 | * | Arrrr joined #nim |
07:21:00 | * | gokr joined #nim |
07:28:02 | * | claudiuinberlin joined #nim |
07:37:18 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
07:43:00 | * | xet7 quit (Quit: Leaving) |
07:46:43 | * | claudiuinberlin joined #nim |
07:58:06 | * | vivus quit (Quit: Leaving) |
08:04:40 | * | ipjk__ joined #nim |
08:06:56 | * | ipjk_ quit (Ping timeout: 248 seconds) |
08:10:11 | * | PMunch joined #nim |
08:14:48 | * | Matthias247 joined #nim |
08:25:38 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
08:29:58 | FromGitter | <BigEpsilon> Hi all |
08:31:50 | FromGitter | <BigEpsilon> @Araq , I updated my PR https://github.com/nim-lang/Nim/pull/6326 |
08:32:14 | FromGitter | <BigEpsilon> hope It works now |
08:33:08 | Araq | wtf, Tarjan's algorithm |
08:33:25 | Araq | are you trying to beat me on my homeground? :P |
08:33:41 | FromGitter | <BigEpsilon> :P |
08:33:59 | FromGitter | <BigEpsilon> Honestly I didn't find a simpler way |
08:34:29 | FromGitter | <BigEpsilon> once you split the typeDefinition, merging them back is a mine field |
08:34:40 | FromGitter | <BigEpsilon> I needed to do that properly |
08:36:29 | Arrrr | Good stuff, this is what nim needs |
08:36:31 | Araq | I bet my solution was faster :P |
08:36:45 | Araq | but good work, now ... do you think it's ready to be announced? |
08:37:39 | Araq | also, top level include statements need to be expanded and then you need to test if my wxWidgets wrapper that previously used .noforward: on works with reorder: on instead |
08:38:29 | FromGitter | <BigEpsilon> I'm not sure because I dont know the language enough to be sure I didnt miss something |
08:38:40 | FromGitter | <BigEpsilon> Ok I can do that |
08:39:24 | FromGitter | <BigEpsilon> But what do you mean by expanding the top level imports ? |
08:39:24 | * | claudiuinberlin joined #nim |
08:40:13 | Araq | not imports, includes! |
08:40:17 | Araq | big difference |
08:40:53 | Araq | type X = Dependency |
08:41:07 | Araq | include foo # contains |
08:41:12 | Araq | type Dependency = int |
08:41:34 | FromGitter | <BigEpsilon> Ah ok I'll need to read the doc a little and think avout it |
08:41:37 | Araq | it's quite simple to do, I hope |
08:41:50 | FromGitter | <BigEpsilon> I hope :) |
08:41:56 | Araq | you can just expand the includes before the algorithm starts |
08:42:20 | FromGitter | <BigEpsilon> Ok I'll try that |
08:42:22 | Araq | but do not touch includes in a 'when' or stuff like that |
08:43:14 | FromGitter | <BigEpsilon> Ok |
08:43:58 | Araq | er ... are you aware the algorithm's analysis is a big heuristic? |
08:44:32 | Araq | the dependencies are not accurate at all, does that matter for Tarjan's algorithm? |
08:45:42 | FromGitter | <BigEpsilon> what do you mean that they are not accurate ? |
08:46:02 | Araq | it's all an educated guess about how things will turn out |
08:46:05 | Araq | # not a DAG! |
08:46:18 | FromGitter | <BigEpsilon> ah yes |
08:46:19 | Araq | # rollback what we did, it turned out to be a dependency that caused |
08:46:19 | Araq | # trouble: |
08:46:48 | Araq | you need to keep the order if things get messy |
08:47:18 | FromGitter | <BigEpsilon> the order is kept in normal cases |
08:47:39 | FromGitter | <BigEpsilon> but I should verify how a messy situation can occur |
08:48:05 | FromGitter | <BigEpsilon> For me a messy situation is a circular dependency |
08:48:11 | Araq | yes |
08:48:16 | FromGitter | <BigEpsilon> there are the legit ones |
08:48:32 | Araq | the cycles can be fake though |
08:48:45 | Araq | proc bar() = foo() |
08:48:54 | Araq | proc foo() = bar("x") |
08:49:00 | Araq | proc bar(s: string) = echo s |
08:49:05 | FromGitter | <BigEpsilon> with tarjan's algorithm it is easy to analys such cases |
08:49:28 | FromGitter | <BigEpsilon> because they will be put in a strongly connected component |
08:49:40 | Araq | see above, no real cycle but the analysis doesn't perform overloading resolution to see it |
08:50:53 | FromGitter | <BigEpsilon> In the worst case we will have to add more checks on the strongly connected components |
08:51:51 | FromGitter | <BigEpsilon> And somtimes the reordering will just fail |
08:52:06 | * | yglukhov joined #nim |
08:52:09 | FromGitter | <BigEpsilon> we should be able to detect when thats happens |
08:52:13 | Araq | yup, the important thing is that this failure keeps the original order |
08:52:26 | Araq | in the end the programmer knows best. |
08:52:28 | FromGitter | <BigEpsilon> I'll keep that in my mind |
08:53:48 | FromGitter | <BigEpsilon> The nodes in my graph have an Id which is their initial order |
08:54:09 | FromGitter | <BigEpsilon> so it is simple to re-arrenge them |
08:56:01 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
08:56:37 | * | yglukhov quit (Ping timeout: 255 seconds) |
08:56:46 | FromGitter | <BigEpsilon> your example with functions overloading compiles for example |
08:57:25 | * | sz0 joined #nim |
08:57:25 | FromGitter | <BigEpsilon> But I'm sure I can find one that does not |
08:58:04 | Araq | well annotate random modules in compiler/ with {.reorder: on} and see if it breaks bootstrapping |
08:58:29 | Araq | that's a serious smoke test then |
08:59:06 | Araq | you can even go crazy and enable it for every module except 'system' |
08:59:38 | Araq | (ok ok, you can also try system) |
08:59:58 | Araq | I'd like to make this a default pass in Nim and not yet another pragma option people need to learn about |
09:01:28 | * | thomasross_ quit (Remote host closed the connection) |
09:01:53 | * | thomasross_ joined #nim |
09:02:27 | * | claudiuinberlin joined #nim |
09:03:24 | * | yglukhov joined #nim |
09:05:40 | FromGitter | <BigEpsilon> Ok I'll try that |
09:08:48 | * | BitPuffin|osx joined #nim |
09:18:31 | * | dom96|w joined #nim |
09:20:56 | yglukhov | dom96: hey |
09:21:06 | dom96|w | hi |
09:21:06 | yglukhov | lets do smth about https://github.com/nim-lang/nimble/pull/401 |
09:21:46 | * | couven92 joined #nim |
09:21:53 | yglukhov | had to switch to my nimble fork to continue working =) |
09:21:59 | dom96|w | D: |
09:22:04 | dom96|w | Okay, i'll look into it tonight |
09:22:52 | yglukhov | ok, thanks. need any input from me? |
09:23:34 | dom96|w | Make sure that you cannot reproduce my bug. Maybe try to do what I had done (as described in the issue)? |
09:24:12 | dom96|w | The first thing I will do is try to reproduce it using your issue |
09:24:25 | dom96|w | Make sure that you've `nimble install`'ed it |
09:26:09 | yglukhov | dom96: i tried your exact steps, cnr |
09:26:23 | yglukhov | tried them again just now |
09:27:12 | FromGitter | <Grabli66> Has anyone tried nim-godot binding? Is it working? :) |
09:27:20 | dom96|w | oh well, i'll try it again tonight. |
09:27:43 | dom96|w | You'll just need to be patient :) |
09:27:51 | yglukhov | ok |
09:36:31 | * | cspar_ quit (Ping timeout: 248 seconds) |
09:39:00 | * | cspar_ joined #nim |
09:47:55 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:57:42 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
09:59:13 | * | dom96|w joined #nim |
10:01:01 | couven92 | @Yardanico, could you check unicode.editDistance now? I made a new optimization for the "skipping upper triangle part"... Most likely improvements are only going to show up with longer strings though.... |
10:01:05 | * | cspar_ quit (Ping timeout: 240 seconds) |
10:01:29 | * | claudiuinberlin joined #nim |
10:03:48 | * | claudiuinberlin quit (Client Quit) |
10:06:20 | * | Matthias247 quit (Read error: Connection reset by peer) |
10:06:55 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
10:10:15 | * | Yardanico joined #nim |
10:11:57 | couven92 | anyways, I think unicode.editDistance https://github.com/nim-lang/Nim/pull/6301 is ready now :) |
10:12:19 | Yardanico | hi everyone |
10:12:23 | * | skrylar joined #nim |
10:12:40 | FromGitter | <Yardanico> @Grabli66 yes, definitely working |
10:12:48 | FromGitter | <Yardanico> Guys from Xored Inc made it for their game |
10:13:00 | couven92 | Hi Yardanico! :) |
10:13:07 | FromGitter | <Bennyelg> @Yardanico Hi |
10:16:29 | * | haha_ joined #nim |
10:25:00 | PMunch | cabhishek, you on? |
10:26:15 | * | ShalokShalom_ joined #nim |
10:29:22 | * | ShalokShalom quit (Ping timeout: 260 seconds) |
10:32:01 | * | claudiuinberlin joined #nim |
10:32:05 | FromGitter | <zacharycarter> o/ |
10:35:05 | FromGitter | <zacharycarter> def-pri-pub: reviewing PR now, sorry just got back from camping |
10:35:11 | * | claudiuinberlin quit (Client Quit) |
10:36:43 | FromGitter | <zacharycarter> @Grabli66 from my understanding yes godot-nim is working or nim-godot |
10:37:03 | Yardanico | godot-nim |
10:37:07 | Yardanico | https://github.com/pragmagic/godot-nim |
10:37:14 | FromGitter | <zacharycarter> that be the one |
10:37:27 | Yardanico | it auto-generated high-level bindings |
10:37:55 | Yardanico | example |
10:37:55 | Yardanico | https://github.com/pragmagic/godot-nim-stub/blob/master/src/fpscounter.nim |
10:43:09 | * | dom96|w joined #nim |
10:50:03 | FromGitter | <mratsim> Godot is shiny |
10:50:38 | * | dddddd joined #nim |
10:51:52 | FromGitter | <Grabli66> And will be godot-nim works in web browser with webassembly? |
10:54:05 | Yardanico | Grabli66: not sure, but maybe it could |
10:54:17 | Yardanico | well this is not top-priority for godot-nim developers :) |
10:54:48 | FromGitter | <Grabli66> Sad |
10:54:53 | * | dom96|w quit (Read error: Connection reset by peer) |
10:56:15 | Yardanico | use nimgame2 |
10:56:58 | Yardanico | https://github.com/Vladar4/nimgame2 and https://github.com/Jipok/Nim-SDL2-and-Emscripten |
10:58:00 | FromGitter | <Grabli66> I want 3D in browser. And dont want write game engine. It's very hard. |
10:58:26 | Yardanico | nimgame2 is a game framework |
10:58:29 | Yardanico | well |
10:58:32 | FromGitter | <mratsim> Unity already has web browser plugin and I’m pretty sure they will write a WebAssembly version |
10:58:33 | Yardanico | use unreal engine4 :) |
10:58:44 | Yardanico | mratsim: but unity can't support nim :) |
10:58:48 | Yardanico | and web browser plugin uses NPAPI |
10:58:48 | FromGitter | <Grabli66> I hate unity :) |
10:58:55 | Yardanico | so it doesn't work in any of modern browsers |
10:59:06 | Yardanico | but they have asm.js version |
10:59:26 | Yardanico | Grabli66: https://github.com/pragmagic/nimue4 |
10:59:42 | Yardanico | but it would be not like pure-nim |
10:59:49 | Yardanico | because you'll have to use pointers and stuff like that |
10:59:59 | Yardanico | but it's a "3d game in browser" |
11:01:04 | FromGitter | <Grabli66> Unity and ue4 makes a large javascript output. |
11:01:13 | Yardanico | yes |
11:01:21 | Yardanico | but "And dont want write game engine. It's very hard." |
11:01:29 | FromGitter | <mratsim> What do you recommend as a vim plugin for Nim, zah’s: https://github.com/zah/nim.vim or baabelfish’s: https://github.com/baabelfish/nvim-nim. (Or even better, a way to edit remotely in VScode that doesn’t use “rmate”) |
11:01:37 | FromGitter | <Grabli66> I think better choose babylonjs or threejs. I choosed babylonjs |
11:01:50 | Yardanico | these are not game engines |
11:02:44 | FromGitter | <Grabli66> Babylonjs is a game engine. Threejs is not |
11:02:55 | Yardanico | well you're not quite right |
11:02:59 | Yardanico | "A complete JavaScript framework for building 3D games with HTML5, WebGL, WebVR and Web Audio" |
11:03:03 | Yardanico | it says on babylon js page |
11:03:11 | * | dom96|w joined #nim |
11:03:50 | Yardanico | and yes, if you want the game only for browser - create wrapper for babylonjs :) |
11:03:52 | Yardanico | and use Nim :D |
11:03:56 | FromGitter | <Grabli66> Yes. It's Framework. |
11:04:03 | Yardanico | it would work and wouldn't make big js output |
11:04:39 | FromGitter | <Grabli66> I think about it. But it's need a lot of time. |
11:04:50 | Yardanico | well less time than developing new game engine :) |
11:05:24 | yglukhov | dom96: looks like theres some sort of regression in nimble. `nimble install -dy` on my project with a lot of dependencies (and diamonds) fails with: Error: Cannot satisfy the dependency on nimx #head and nimx 0.1 |
11:05:56 | dom96|w | yglukhov: D: |
11:06:06 | FromGitter | <mratsim> An alternative would be to get more people interested in Nim, and then wait for one of them to develop bindings to whatever game engine you like ;) |
11:06:24 | dom96|w | yglukhov: Please report it. If you've got some time then please also create a small test case for it. |
11:06:46 | dom96|w | Hopefully I'll be able to fix it tonight. |
11:07:03 | dom96|w | then I can release a new version in time for the new Nim version :) |
11:07:17 | * | Arrrr quit (Ping timeout: 260 seconds) |
11:07:27 | FromGitter | <mratsim> oooh, new Nim version? this week? |
11:07:28 | Yardanico | dom96|w, so will it be released in this month? |
11:07:36 | * | haha_ quit (Quit: haha_) |
11:07:43 | dom96|w | Yardanico: sure. |
11:07:50 | Yardanico | nice |
11:07:55 | dom96|w | mratsim: most likely |
11:09:36 | Yardanico | https://github.com/nim-lang/Nim/compare/master...devel almost 300 commits for new version :) |
11:09:41 | Yardanico | maybe even bigger |
11:16:21 | * | haha_ joined #nim |
11:20:31 | FromGitter | <Grabli66> Is there free version of Nim in action? Sorry, i am greed. :) |
11:21:09 | * | cspar_ joined #nim |
11:24:59 | * | xet7 joined #nim |
11:25:45 | Yardanico | officially - no |
11:25:50 | Yardanico | but someone can share it with you |
11:25:59 | Yardanico | I have it, but not the final version |
11:27:02 | FromGitter | <Grabli66> Is there something new, that official documentation does not have? |
11:27:39 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
11:30:27 | FromGitter | <Grabli66> And, can you share, please? :) |
11:31:51 | livcd | i'd like to start using nim. I read some documentation and the by-example stuff. The only use case I have now would be to have a jester app with MSSQL as a data source |
11:32:26 | livcd | I believe MSSQL driver is not in a good shape right ? I have seen some odbc packages on github but they did not seem to be maintained anymore |
11:33:09 | * | SusWombat_ quit (Ping timeout: 252 seconds) |
11:33:19 | Yardanico | Grabli66: what do you mean by "new"? |
11:33:29 | Yardanico | documentation in devel branch reflects current state of the language |
11:35:00 | FromGitter | <Grabli66> Yardanico, some information, that is not in official documentation. |
11:35:04 | Yardanico | well no |
11:35:09 | Yardanico | it just teaches you how to use nim |
11:35:13 | Yardanico | with some example apps |
11:35:35 | Yardanico | chat server/client app, "twitter" clone (simple one), fast parallel parser |
11:35:47 | Yardanico | you can find all cod ehere - https://github.com/dom96/nim-in-action-code |
11:35:49 | Yardanico | *code here |
11:35:55 | Yardanico | ah, and configurator app |
11:35:59 | Yardanico | which teaches you to use macros |
11:36:59 | Araq | livcd: odbc has been used successfully with MSSQL once but I don't know more than that |
11:38:03 | Yardanico | well https://github.com/coffeepots/odbc was updated on 24 of may |
11:38:07 | Yardanico | so it probably would still work |
11:39:22 | * | cspar_ quit (Ping timeout: 260 seconds) |
11:41:59 | * | Arrrr joined #nim |
11:41:59 | * | Arrrr quit (Changing host) |
11:41:59 | * | Arrrr joined #nim |
11:43:13 | * | ShalokShalom_ is now known as ShalokShalom |
11:48:52 | * | claudiuinberlin joined #nim |
11:49:52 | * | Arrrr quit (Ping timeout: 260 seconds) |
11:52:29 | * | Arrrr joined #nim |
11:52:29 | * | Arrrr quit (Changing host) |
11:52:29 | * | Arrrr joined #nim |
11:53:10 | * | BigEpsilon quit (Ping timeout: 264 seconds) |
11:53:11 | * | cspar_ joined #nim |
11:54:30 | * | BigEpsilon joined #nim |
11:58:01 | livcd | Araq: Yardanico oh i guess then I should be happy with that |
11:58:14 | Yardanico | does it work? |
11:58:43 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
12:02:40 | * | dom96|w joined #nim |
12:02:50 | livcd | Yardanico: i have not tried the pkg yet |
12:03:33 | * | vlad1777d joined #nim |
12:07:41 | * | arnetheduck joined #nim |
12:10:15 | * | claudiuinberlin joined #nim |
12:10:48 | * | claudiuinberlin quit (Client Quit) |
12:16:29 | * | Snircle joined #nim |
12:22:25 | dom96|w | Grabli66: You can download two of the chapters for free on https://book.picheta.me :) |
12:22:56 | FromGitter | <Grabli66> Thanks. :) |
12:23:35 | FromGitter | <Grabli66> dom96|w, are you author of streams in nim? |
12:24:26 | Yardanico | Grabli: he's probably not |
12:24:30 | Yardanico | I bet it's Araq |
12:25:13 | Yardanico | well you can't have 1 author |
12:25:18 | Yardanico | it's open-source |
12:25:19 | * | rauss quit (Quit: WeeChat 1.9) |
12:25:48 | FromGitter | <Grabli66> I dont understand why stream has readnt8, readInt16, readInt32 procedures, but it does not have write procedures like writetInt8, etc |
12:26:08 | Yardanico | because it's a stream |
12:26:34 | Yardanico | well it has write procs |
12:26:44 | Yardanico | ah |
12:26:52 | Yardanico | you don't need different write procs |
12:26:58 | FromGitter | <Grabli66> Why? |
12:30:47 | Yardanico | because "write" proc takes ALL possible types |
12:30:51 | Yardanico | which can be converted to binary |
12:30:54 | * | haha_ quit (Quit: haha_) |
12:31:00 | Yardanico | https://gist.github.com/Yardanico/459edafa2a2458eee377d0aa823f0f90 |
12:31:16 | Yardanico | you need setPosition here to set stream position to zero (to read it from the beginning) |
12:31:25 | Yardanico | if you don't read from stream, and only write - you don't need setPosition |
12:31:33 | Yardanico | and yeah, flush is not needed |
12:32:05 | FromGitter | <Grabli66> Ok. Understood now. |
12:33:26 | dom96|w | This is because there is no return type overloading |
12:33:32 | dom96|w | So you can't have a single read() |
12:33:50 | Yardanico | yeah |
12:33:59 | Yardanico | if this was available, it would require you to write code like |
12:34:04 | Yardanico | let x: int8 = data.read() |
12:34:12 | Yardanico | so no big difference |
12:34:47 | Yardanico | need to make socket stream :) |
12:35:05 | Yardanico | nvm |
12:35:08 | Yardanico | it's already here :D |
12:35:08 | FromGitter | <Grabli66> Can i create stream from string and then convert stream to string without string copy? It's need, cause websocket uses string to read and send data. |
12:35:56 | FromGitter | <Grabli66> But i want to work with streams, not strings |
12:36:31 | Yardanico | implement websocket interface for streams, this would probably be the best way |
12:36:42 | FromGitter | <Grabli66> Good idea :) |
12:36:55 | Yardanico | but why do you use binary types over a websocket ? :) |
12:37:26 | FromGitter | <Grabli66> Cause i want send binary data |
12:37:34 | Yardanico | github is a good thing :) |
12:37:34 | Yardanico | https://github.com/search?q=language%3Anim+socket+stream&type=Code |
12:37:41 | Yardanico | first result is exactly that I need |
12:39:30 | skrylar | i thought there was return type overloading? |
12:39:38 | Yardanico | no |
12:39:39 | skrylar | pretty sure i did it, even though it confuses the type inferrence |
12:39:48 | Yardanico | how you would use your proc then? |
12:39:53 | Yardanico | maybe you're talking about generic procs? |
12:40:00 | Yardanico | yeah, you can do it with generic procs |
12:40:01 | skrylar | assign it to a var where the type is already known |
12:40:01 | Yardanico | like |
12:40:15 | Yardanico | let x = data.read[int8]() |
12:40:20 | Yardanico | this would work too |
12:47:16 | * | claudiuinberlin joined #nim |
12:58:29 | Araq | no, it's read[int8](data) |
12:59:48 | Yardanico | well this would definitely make streams code a little bit less verbose |
13:00:10 | Yardanico | but backwards compatibility, so no :) |
13:01:12 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:07:25 | * | rauss joined #nim |
13:10:15 | couven92 | Araq, can I use a pragma in Nim code to set a `--clib:<libpath>`... like `{.clib: libpath.}`? |
13:10:39 | Araq | I doubt it |
13:10:49 | couven92 | So I really have to use `{.passL.}`? |
13:11:16 | couven92 | okay, I'll make that a suggestion |
13:22:02 | Arrrr | Araq, will 'let i: int8 = read(data)' work for release? |
13:22:13 | Araq | no |
13:22:18 | Arrrr | And after? |
13:22:28 | Araq | I've said it before: return type disambiguation sucks |
13:22:53 | Araq | don't want to see libraries that rely on it. |
13:23:26 | Arrrr | But actually, it is the same except two brackets |
13:23:49 | Arrrr | implementation complexity aside, i don't see what's wrong with that |
13:24:37 | Yardanico | well forcing people to write types when declaring a var while using one libary (and they don't need to write types for other libraries) is not consistent |
13:25:43 | Arrrr | Yep, looks strange that i can do `write(a)` instead of `write[int](a)` but i can't do the same when reading, for example |
13:25:58 | Arrrr | I can live with that if is hard to implement tho. |
13:26:26 | Araq | you have to live with it because it really is a bad idea tho |
13:26:46 | Araq | Nim has enough ways to write the same thing |
13:26:49 | Araq | we don't need more |
13:28:25 | Arrrr | that one happens to be the most obvious, not one in a million |
13:31:37 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
13:36:44 | * | relax joined #nim |
13:39:25 | * | claudiuinberlin joined #nim |
13:40:26 | * | sz0 quit (Quit: Connection closed for inactivity) |
13:45:38 | * | dom96|w quit (Quit: Textual IRC Client: www.textualapp.com) |
13:49:05 | * | cspar_ quit (Ping timeout: 240 seconds) |
14:02:02 | FromGitter | <Bennyelg> I already Own the book :D |
14:05:22 | * | rokups joined #nim |
14:07:44 | * | Jesin joined #nim |
14:08:07 | * | skrylar quit (Ping timeout: 260 seconds) |
14:12:22 | FromGitter | <k0pernicus> @dom96 Do you know if I can “give” my PDF book rights to a given person? |
14:12:35 | FromGitter | <k0pernicus> Actually, I own two versions of “Nim In Action" |
14:13:11 | FromGitter | <k0pernicus> The MEAP one (only electronic documents), and I ordered the paper one two/three days ago (and I have also electronic documents) |
14:13:38 | FromGitter | <Bennyelg> I got the paper week ago |
14:13:46 | FromGitter | <k0pernicus> It may be beneficial for other Nim-guy to own a free copy of the “Nim in Action”... |
14:13:53 | FromGitter | <Bennyelg> I ordered the book 2 months ago but it wasnt ready yet |
14:14:06 | FromGitter | <Bennyelg> excellent book |
14:17:04 | Yardanico | k0pernicus: you can definitely do it, but AFAIK PDF version contains your email and name & surname (it was like this in meap edition) |
14:18:14 | Yardanico | but you can remove it |
14:18:43 | FromGitter | <k0pernicus> Yep, I know - actually, I asked here to “transmit” my rights to a new “user” (so, instead of my email & name, the email & name of the new owner) |
14:18:53 | FromGitter | <k0pernicus> Like a late gift |
14:19:04 | FromGitter | <k0pernicus> (or something like that) |
14:19:57 | Yardanico | well you should ask manning for this I think |
14:19:58 | Yardanico | not dom96 :) |
14:20:23 | FromGitter | <k0pernicus> It was the easy-way :-p |
14:20:36 | Yardanico | well maybe dom96 has rights like this |
14:20:38 | Yardanico | but I don't know |
14:20:55 | * | haha_ joined #nim |
14:24:57 | * | mahmudov joined #nim |
14:29:12 | * | BigEpsilon quit (Remote host closed the connection) |
14:29:29 | * | BigEpsilon joined #nim |
14:30:12 | FromGitter | <Bennyelg> Any Nim Summit anytime soon? |
14:33:05 | federico3 | Bennyelg in which country? |
14:33:35 | FromGitter | <Bennyelg> I can come to any place In europe if the summit is big |
14:36:19 | ipjk__ | I think there have been one or two meetings in DE |
14:36:32 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
14:41:54 | * | coffepot joined #nim |
14:42:47 | * | claudiuinberlin joined #nim |
14:43:37 | * | coffepot quit (Client Quit) |
14:45:28 | * | coffeepot joined #nim |
14:53:54 | * | PMunch quit (Quit: Leaving) |
14:57:36 | Yardanico | hmmm |
14:57:38 | Yardanico | https://github.com/Araq/ormin |
14:57:49 | Yardanico | I'm following Araq on github :D |
14:58:10 | Araq | stalker! |
14:58:56 | * | Matthias247 joined #nim |
14:59:57 | yglukhov | oh, we have an orm too. for mongo. |
15:00:16 | yglukhov | what will be yours like? =) |
15:00:30 | Yardanico | yglukhov, i'll give you a link to irc logs now :) |
15:00:31 | Yardanico | let me find it |
15:01:43 | Yardanico | hmm, can't find it :P |
15:02:34 | Yardanico | ah |
15:02:35 | Yardanico | found it |
15:02:46 | Yardanico | starting from here - https://irclogs.nim-lang.org/01-09-2017.html#15:07:08 |
15:02:50 | Yardanico | yglukhov, ^ |
15:03:28 | ipjk__ | Should I think of 'concepts' as traits? |
15:03:33 | Yardanico | and about ormin: 'ormin' is a helper tool that parses SQL and produces Nim code |
15:03:36 | ipjk__ | Or am I missunderstanding |
15:03:46 | Yardanico | ipjk__, user-defined type classes :) |
15:03:57 | Yardanico | well I don't know |
15:03:59 | Yardanico | maybe they are |
15:04:42 | yglukhov | nice. i'll be watching it too then :D |
15:05:24 | * | PMunch joined #nim |
15:16:30 | * | solitudesf26 joined #nim |
15:16:50 | * | solitudesf26 quit (Client Quit) |
15:20:16 | * | miran joined #nim |
15:21:34 | * | Jesin quit (Quit: Leaving) |
15:24:50 | * | Jesin joined #nim |
15:26:25 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
15:28:49 | * | claudiuinberlin joined #nim |
15:30:36 | * | solitudesf joined #nim |
15:31:27 | FromGitter | <ephja> make a DSL that encompasses at the very least standard SQL ;) |
15:32:31 | FromGitter | <mratsim> LinQ ! |
15:33:16 | coffeepot | just downloaded the latest Nim from github, went through all stages successfully up to "iteration: 2" where it called "compiler\nim1.exe c -d:release --nimcache:nimcache/r_windows_i386 compiler\nim.nim", at which point it fails on an assert "len(ver) == 0 or contains({0, 35, 48..57}, ver[0]) wrong version: master" |
15:33:22 | coffeepot | what did i screw up :) |
15:34:05 | Yardanico | coffeepot, what file have you downloaded? |
15:34:30 | coffeepot | there doesn't seem to be a nim.nim in the c:\nim\nimcache\r_windows_i386 folder |
15:34:46 | Yardanico | coffeepot, did you clone nim repo? |
15:34:51 | coffeepot | uh I just went to https://github.com/nim-lang/Nim#compiling |
15:34:55 | coffeepot | yeah |
15:35:10 | Yardanico | maybe you've cloned master branch, not devel? |
15:35:31 | coffeepot | seems like it don't it :/ |
15:37:17 | coffeepot | that's odd, i've always just been able to use the commands listed https://github.com/nim-lang/Nim#compiling and it's been ok |
15:37:41 | coffeepot | $ git clone https://github.com/nim-lang/Nim.git |
15:37:41 | coffeepot | $ cd Nim |
15:37:41 | coffeepot | $ git clone --depth 1 https://github.com/nim-lang/csources.git |
15:37:41 | coffeepot | $ cd csources |
15:37:41 | coffeepot | $ sh build.sh |
15:37:41 | coffeepot | $ cd ../ |
15:37:42 | coffeepot | $ bin/nim c koch |
15:37:42 | coffeepot | $ ./koch boot -d:release |
15:38:30 | * | coffeepot scratches head |
15:43:18 | * | Trustable joined #nim |
15:43:38 | yglukhov | coffeepot: this has just been fixed |
15:43:43 | yglukhov | i think |
15:43:58 | yglukhov | https://github.com/nim-lang/Nim/pull/6335 |
15:44:02 | coffeepot | literally just? What was the problem out of interest? |
15:44:42 | yglukhov | you likely have packages with versions with dashes? |
15:44:53 | yglukhov | in your .nimble/pkgs? |
15:45:17 | coffeepot | that's quite possible yeah i haven't updated my nimble packages for aeons |
15:45:53 | yglukhov | well, you'll need to delete/rename those to bootstrap. after bootstraping with lastest fixes, they should work again |
15:46:27 | coffeepot | ah ok, i'll just dump my packages folder and re-acquire |
15:47:01 | * | relax quit (Ping timeout: 240 seconds) |
15:51:27 | * | ipjk__ quit (Quit: Leaving) |
15:53:10 | * | gokr quit (Ping timeout: 264 seconds) |
15:53:18 | yglukhov | coffeepot: so that helps? |
15:53:35 | FromGitter | <cabhishek> @FromIRC I am now |
15:53:55 | coffeepot | literally just finished: SUCCESS :D |
15:54:13 | coffeepot | thanks yglukhov! |
15:54:20 | yglukhov | cool |
15:59:28 | * | thomasross_ quit (Remote host closed the connection) |
15:59:54 | * | thomasross_ joined #nim |
16:00:40 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
16:02:09 | * | claudiuinberlin joined #nim |
16:02:50 | * | coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
16:05:23 | * | claudiuinberlin quit (Client Quit) |
16:08:47 | * | gokr joined #nim |
16:09:22 | * | solitudesf_ joined #nim |
16:10:16 | * | claudiuinberlin joined #nim |
16:10:37 | * | solitudesf_ quit (Remote host closed the connection) |
16:10:52 | * | solitudesf quit (Remote host closed the connection) |
16:11:12 | * | solitudesf joined #nim |
16:11:20 | Demos[m] | is there a semaphore provided someplace? |
16:11:28 | Demos[m] | besides pthreads |
16:14:00 | * | enthus1ast__ joined #nim |
16:15:01 | def- | Demos[m]: threadpool.nim has one |
16:15:47 | Demos[m] | not exported it looks like... |
16:16:32 | * | arnetheduck quit (Ping timeout: 248 seconds) |
16:17:23 | Yardanico | Demos[m], copy-paste ? :) |
16:17:55 | def- | or make a lib/core/semaphores.nim, move it there, export it, document it, and make threadpool import it |
16:18:12 | Demos[m] | yeah def that would be the plan |
16:18:18 | def- | or put it into locks.nim |
16:18:35 | Demos[m] | there may be reason to use system semaphores, not sure |
16:19:01 | def- | I can think of a reason NOT to use system semaphores |
16:19:11 | def- | unnamed pthreads semaphores are not implemented on mac osx |
16:20:30 | FromGitter | <ephja> ENOSYS<3 |
16:21:25 | * | solitudesf quit (Remote host closed the connection) |
16:22:20 | FromGitter | <ephja> it's a godsend for embedded systems |
16:22:45 | Demos[m] | well you'd restrict the features I guess |
16:23:20 | Demos[m] | wait what? |
16:23:28 | Demos[m] | it looks like an unnamed semaphore is the everyday one |
16:23:37 | Demos[m] | for within one process |
16:23:54 | * | ofelas joined #nim |
16:25:56 | * | claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com) |
16:36:59 | r4vi | anyone written an nginx module with nim? |
16:38:22 | yglukhov | r4vi: your question is way specific i guess. it's either "writing c-abi plugins in nim" or "writing nginx plugin in c" =)) |
16:39:30 | * | yglukhov quit (Remote host closed the connection) |
16:40:26 | r4vi | I guess it's closer to writing a c-abi plugin in nim. I could just do it but was wondering if there were any gotchas related to nginx |
16:42:05 | Yardanico | well you will need to patch nim stdlib |
16:42:12 | Yardanico | I mean memory management |
16:42:19 | Yardanico | because nginx uses it's own alloc functions |
16:42:54 | * | yglukhov_ joined #nim |
16:43:06 | r4vi | Yardanico: I'm not familiar enough with nim to do that so I guess I wont try it |
16:45:18 | Yardanico | well anyway it would require you to write a lot of special nginx-aware code |
16:45:23 | Yardanico | even if you would do it in C |
16:46:14 | r4vi | of course but at least there are examples / docs |
16:46:46 | Yardanico | well you would just wrap needed nginx C functions in nim |
16:46:49 | Yardanico | and do the same as in C |
16:47:05 | * | yglukhov_ quit (Ping timeout: 240 seconds) |
16:55:40 | * | SusWombat joined #nim |
17:04:52 | * | Sentreen quit (Ping timeout: 260 seconds) |
17:17:23 | * | Sentreen joined #nim |
17:26:10 | * | yglukhov joined #nim |
17:27:52 | * | haha_ quit (Quit: haha_) |
17:30:32 | * | yglukhov quit (Ping timeout: 260 seconds) |
17:32:30 | * | haha_ joined #nim |
17:34:00 | * | yglukhov joined #nim |
17:45:46 | * | BigEpsilon quit (Remote host closed the connection) |
17:46:03 | * | BigEpsilon joined #nim |
17:48:09 | * | relax joined #nim |
17:49:23 | * | claudiuinberlin joined #nim |
17:50:52 | * | xet7 quit (Quit: Leaving) |
17:52:44 | * | Trustable quit (Remote host closed the connection) |
17:53:22 | * | xet7 joined #nim |
18:03:09 | dom96 | yglukhov: did you get a chance to submit your issue? |
18:03:34 | yglukhov | dom96: nope, sorry. |
18:05:50 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:05:53 | * | vlad1777d quit (Ping timeout: 248 seconds) |
18:06:18 | * | claudiuinberlin joined #nim |
18:15:06 | couven92 | do we have `|=` in Nim? or is it `result = result or v`? |
18:15:19 | Yardanico | I doubt it |
18:16:57 | dom96 | theindex -> Ctrl+F -> `|=` |
18:17:09 | * | Vladar quit (Quit: Leaving) |
18:19:53 | PMunch | Hmm, how do you grow a nim sequence to a given size? |
18:20:33 | FromGitter | <ephja> PMunch: the length? https://nim-lang.org/docs/system.html#setLen,seq[T],Natural |
18:20:52 | PMunch | I load some data from a file and I know how many elements there are, so it would be nice to grow the sequence to that size to begin with |
18:21:18 | PMunch | Ah, nice |
18:21:20 | PMunch | Thanks |
18:21:39 | FromGitter | <ephja> you can set the capacity too but only when initializing |
18:22:05 | Yardanico | yeah |
18:22:11 | Yardanico | like |
18:22:19 | Yardanico | var x = newSeq[int](256) |
18:24:37 | Yardanico | oh, it seems I can't directly pass openArray (my proc has argument like that) to newStringTable |
18:24:44 | Yardanico | guess I'll need to iterate over a string table... |
18:29:20 | Yardanico | *over openarray |
18:29:50 | Yardanico | omgf |
18:30:04 | Yardanico | the issue was: different names of fields in a tuple |
18:31:09 | * | relax quit (Ping timeout: 252 seconds) |
18:47:36 | * | relax joined #nim |
18:51:07 | * | rauss quit (Quit: WeeChat 1.9) |
18:53:56 | dom96 | yglukhov: commented on the issue |
18:54:03 | dom96 | It's much more subtle than I thought |
18:54:12 | dom96 | But hopefully my explanation makes sense |
18:57:45 | FromGitter | <mratsim> If I understand the manually correctly there: https://nim-lang.org/docs/manual.html#type-bound-operations-destructors, having a ``=destroy`` proc and a ``new`` proc with finalizer should cover all cases right? (I’m working on Cuda with GPU memory, and I need to make sure it’s reclaimed) |
19:00:08 | yglukhov | dom96: thanks, will look into it |
19:05:43 | * | haha_ quit (Quit: haha_) |
19:05:44 | Yardanico | mratsim: Be aware that destructors are not called for objects allocated with new. This may change in future versions of language, but for now the finalizer parameter to new has to be used. |
19:06:06 | Yardanico | for now the finalizer parameter to new has to be used |
19:06:42 | Yardanico | also finalizer refers to all objects of the same type |
19:06:47 | Yardanico | The finalizer refers to the type T, not to the object! This means that for each object of type T the finalizer will be called! |
19:08:17 | * | rauss joined #nim |
19:12:35 | FromGitter | <mratsim> let’s do a small scenario with objects of the same type, I do `new a`, `new b`, `c = a` (assuming deep copy). ⏎ ⏎ 1) a goes out of scope. Finalizer is called on a, it does not have to wait for b and c to go out of scope right? ⏎ 2) c goes out of scope. =destroy is called on c, because c wasn’t created with new right? [https://gitter.im/nim-lang/Nim?at=59b048a3bc46472974032110] |
19:13:32 | Yardanico | firstly: you should pass finalizer proc to "new" |
19:14:24 | FromGitter | <mratsim> yes no problem, assume `new(a, finalizerProc)` in the scenarios |
19:16:13 | yglukhov | mratsim: your scenario is illformed somewhat... |
19:19:42 | yglukhov | mratsim: also finalizers are not deterministic. they don't depend on scope. it is very likely that if your `a` doesn't have cycles it will be finalized pretty soon, maybe on the next allocation. but that is kinda not guaranteed. |
19:20:55 | Yardanico | yglukhov, well for some reason manual says "=destroy(v) will be automatically invoked for every local stack variable v that goes out of scope." |
19:21:00 | Yardanico | "out of scope" |
19:21:20 | yglukhov | yup, but `=destroy` is not finalizer |
19:22:19 | FromGitter | <mratsim> non-deterministic is fine, I just want to make sure that by having new+ finalizer and a =destroy proc I will reclaim all GPU memory allocated by my program |
19:22:41 | FromGitter | <mratsim> however objects were created/allocated |
19:23:57 | yglukhov | mratsim: i think finalizers without `=destroy` should be enough for your case. especially if you make sure that your object-to-finalized is not refferred from a cycle. |
19:24:36 | yglukhov | i found `=destroy` to not work for me. if you're thinking c++ raii, `=destroy` is not your friend. |
19:26:46 | yglukhov | mratsim: also you can call GC_fullCollect in strategic places to make sure that even cycles are collected |
19:28:51 | FromGitter | <mratsim> Thanks, I’ll start with finalizers, I’ll see if Cuda/GPU memory leak happen |
19:29:06 | Yardanico | dom96, it seems we'll have release notes for nim 0.17.2 ? :) https://github.com/dom96/relnotesgen |
19:30:16 | dom96 | This has been used for at least 5 versions now |
19:30:21 | dom96 | It generates the bugs that have been fixed |
19:30:26 | yglukhov | mratsim: i'm using finalizers in my game engine, they work fine. also i force GC_fullCollect when scenes change. |
19:30:32 | dom96 | You should stop stalking me :P |
19:30:52 | Yardanico | I didn't :P |
19:30:54 | dom96 | *generates a list of .... |
19:30:58 | Yardanico | just randomly looked at your repos |
19:31:19 | Yardanico | dom96, oh, sorry, I didn't knew :D |
19:31:57 | * | oaao1 quit (Quit: Leaving) |
19:32:36 | FromGitter | <mratsim> @yglukhov I see, good to know, if games don’t leak with finalizers I should be fine as well |
19:41:33 | * | BigEpsilon quit (Ping timeout: 252 seconds) |
19:45:13 | * | ofelas quit (Quit: shutdown -h now) |
19:50:43 | * | Yardanico quit (Remote host closed the connection) |
19:53:22 | * | rokups quit (Quit: Connection closed for inactivity) |
19:54:34 | couven92 | can dynlib have environment variables in the lib path? |
20:01:37 | * | Arrrr quit (Ping timeout: 260 seconds) |
20:06:51 | * | gokr quit (Ping timeout: 252 seconds) |
20:07:24 | * | couven92 quit (Quit: Client disconnecting) |
20:21:42 | * | cspar_ joined #nim |
20:32:00 | * | rauss quit (Quit: WeeChat 1.9) |
20:45:21 | * | Jesin quit (Ping timeout: 240 seconds) |
20:47:57 | * | Jesin joined #nim |
20:49:24 | * | claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com) |
20:50:10 | * | miran quit (Ping timeout: 264 seconds) |
20:53:11 | * | couven92 joined #nim |
20:56:01 | * | enthus1ast__ quit (Ping timeout: 248 seconds) |
20:57:53 | * | skrylar joined #nim |
21:05:43 | couven92 | ooops... I created a macro that nicely implements stringify for listed values of a distinct numeric type... I then implemented all windows error codes listed in winerror.h as distinct uint32 values... |
21:06:25 | couven92 | Now I get an executable that is 5 MiB in size, does absolutely nothing, and stores the name of every Windows Error constant in its constant data! :D |
21:07:02 | FromGitter | <ephja> nice |
21:08:24 | couven92 | well... It's annoying that every executable that I build that uses my Windows SDK nimble-package will now grow 5 MiB in size.... :( |
21:11:05 | * | vlad1777d joined #nim |
21:18:01 | * | Snircle joined #nim |
21:19:08 | * | relax quit (Ping timeout: 240 seconds) |
21:31:37 | FromGitter | <zacharycarter> o/ |
21:35:47 | couven92 | Hmmm... I have a template that takes an untyped argument... How do I pass the untyped `ast` parameter to a macro inside the template? |
21:36:25 | * | PMunch quit (Quit: leaving) |
21:38:05 | * | mahmudov quit (Ping timeout: 240 seconds) |
21:44:31 | FromGitter | <zacharycarter> would it be possible to write a macro to do something like |
21:44:40 | FromGitter | <zacharycarter> `````` |
21:53:22 | * | gokr joined #nim |
21:58:35 | FromGitter | <zacharycarter> def-pri-pub: please ping me when you have a chance |
22:06:38 | dom96 | anybody want to write a xz decompressor for Nim? |
22:06:48 | dom96 | choosenim having to download a 68MB tar.gz sucks :\ |
22:07:05 | FromGitter | <zacharycarter> have an example of one written in C? |
22:07:42 | FromGitter | <zacharycarter> found one |
22:09:15 | dom96 | ooh, yay, gonna write one? :) |
22:09:52 | dom96 | gz is ridiculously bad in comparison to xz |
22:09:57 | dom96 | 4mb vs 67mb |
22:10:01 | FromGitter | <zacharycarter> oh wow |
22:10:09 | FromGitter | <zacharycarter> I might, I need to stare at this implementation some more first |
22:10:56 | dom96 | cool |
22:12:33 | FromGitter | <zacharycarter> looks like most of them are implemented in golang, at least the ones that are well written |
22:13:33 | * | Jesin quit (Quit: Leaving) |
22:14:14 | FromGitter | <zacharycarter> nm found a nice one written in C |
22:14:26 | FromGitter | <zacharycarter> I'll give it a go |
22:16:04 | Araq | porting from Go is not hard either, Go has no features so you can just replace {} with nothing and 'x := y' with 'var x = y' |
22:17:03 | FromGitter | <zacharycarter> gotcha |
22:29:32 | * | def-pri-pub joined #nim |
22:29:35 | dom96 | https://github.com/nim-lang/Nim/blame/devel/tools/niminst/buildsh.tmpl#L50 |
22:30:05 | dom96 | I'm afraid that this is preventing the release :) |
22:30:37 | * | nsf quit (Quit: WeeChat 1.9) |
22:33:42 | dom96 | so looks like we'll have to scrap unti tomorrow |
22:33:45 | dom96 | *until |
22:35:27 | Araq | couven92: thanks for that ... -.- |
22:35:39 | couven92 | Araq? |
22:35:53 | Araq | how hard is it to write posix shell scripts? |
22:36:07 | Xe | you'd be amazed |
22:36:30 | Araq | uosname=`uname -o` breaks our builds on OSX |
22:36:33 | Araq | at least |
22:36:39 | Araq | can't release |
22:36:47 | couven92 | really? :O |
22:36:50 | Araq | yes. |
22:36:59 | couven92 | Oh, I had no idea :/ |
22:37:39 | Araq | now I have to lookup again how to remove fucking git tags because git was created by dyslexics |
22:38:54 | couven92 | I am sorry, I assumed `uname -o` worked everywhere... man says: "-o, --operating-system print the operating system" |
22:39:12 | dom96 | Araq: dude |
22:39:18 | dom96 | Calm down. |
22:39:27 | dom96 | It's an easy mistake |
22:39:32 | Araq | I'm pissed |
22:40:38 | dom96 | We'll just release tomorrow, it's no big deal |
22:41:02 | couven92 | Araq, shall I do a quick PR that reverts all that? It'll take me about 20 minutes tops? |
22:41:17 | dom96 | couven92: It would be better if you created a PR that fixes the issue |
22:41:26 | dom96 | The '-o' is missing from OS X btw |
22:41:42 | Araq | no, it's not obvious how to fix this |
22:41:53 | Araq | and reverting it has no priority, I removed the git tags again |
22:42:16 | couven92 | Araq, dom96, yeah it's not obvious... However, we only need this on Android... so... |
22:42:52 | Araq | in the future I'm not gonna accept and shell script updates whatsoever :-) |
22:43:15 | couven92 | this really only went in there, because android thinks it's linux (which is true, kinda), and there was no other way to detect Android from shell |
22:43:26 | Araq | I know why it's there |
22:43:38 | couven92 | Araq, yeah, shell scripts are horrible! :P |
22:43:44 | Araq | it's my mistake for not checking if '-o' is in Posix |
22:44:12 | Araq | I was the reviewer, I get the blame |
22:44:22 | Araq | but that doesn't mean I'm not pissed :P |
22:44:35 | dom96 | No, it's nobody's fault. |
22:44:47 | couven92 | well, I can share the blame... I should also have checked it... I didn't. I will in the future though! |
22:44:48 | dom96 | We just need to figure out how to prevent it from happening again |
22:44:57 | dom96 | And the obvious solution is to have proper macOS testing. |
22:45:03 | Araq | true |
22:45:16 | Araq | but unknown when it will arrive |
22:45:42 | Araq | also, that -o flag could easily have bitten us on e.g. Solaris |
22:45:48 | Araq | and not on OSX |
22:46:00 | Araq | so it's better to never touch the shell stuff |
22:46:19 | dom96 | For all you know Solaris may be broken right now. |
22:46:23 | Araq | ok, so we need a Solaris tester. and a FreeBSD one |
22:46:33 | Araq | and a NetBSD, etc etc |
22:46:34 | dom96 | Yep, that's the only way to know for sure. |
22:46:42 | dom96 | Don't forbid changes to something just because it's risky |
22:46:58 | Araq | I only forbid changes to the shell scripts |
22:47:11 | Araq | nothing wrong with that IMO. |
22:47:38 | dom96 | I really need sleep so I'm not going to continue arguing |
22:47:38 | dom96 | Bye |
22:47:43 | Araq | bye |
22:48:15 | couven92 | hmmm... obvious fix: check whether osname is linux, and only then execute `uname -o` |
22:48:38 | Xe | how can one know the OS name without knowing the OS name? |
22:48:42 | couven92 | or even better: try execute `uname -o`, do nothing if it fails |
22:49:07 | couven92 | Xe we do some other checks for the os name earlier |
22:50:38 | federico3 | couven92: why -o tho? Is -a being used already and provides the OS name |
22:51:25 | couven92 | federico3, -a would give us everything like: "Linux FRED 4.4.0-43-Microsoft #1-Microsoft Wed Dec 31 14:42:53 PST 2014 x86_64 x86_64 x86_64 GNU/Linux" |
22:52:18 | couven92 | federico3, so on android (inside termux): `uname` returns "Linux", but `unmame -o` returns "Android" |
22:53:39 | couven92 | Araq, actually, I updated the shell script some time ago to receive `--os android` as a command-line option... So technically, we could really recvert the -o stuff, since there is a feasable workaround |
22:54:11 | couven92 | the -o really only worked on termux anyways as we later found out... the native uname on android, still gives you back "Linux" |
22:56:17 | Araq | well fix it, I don't really care how you do it as long as it works on every Poonix based OS |
22:56:27 | couven92 | will do |
22:56:41 | * | vlad1777d quit (Ping timeout: 255 seconds) |
22:58:56 | * | Jesin joined #nim |
23:09:15 | couven92 | Araq, https://github.com/nim-lang/Nim/pull/6342 on-liner fix :) |
23:12:31 | * | def-pri-pub quit (Ping timeout: 248 seconds) |
23:25:53 | * | mahmudov joined #nim |
23:37:56 | * | yglukhov quit (Remote host closed the connection) |
23:44:07 | couven92 | Hmm... is there a I-really-know-what-I-am-doing way to get the address of a parameter in a proc? |
23:44:51 | couven92 | Ah... unsafeAddr |
23:46:21 | * | cspar_ quit (Ping timeout: 240 seconds) |
23:50:25 | * | cspar_ joined #nim |